xcode UILabel text add outer glow effect

寵の児 提交于 2019-12-25 01:48:21

问题


How would I add an outer glow effect to a text of a UILabel. I tried to use the layer.shadow... properties but they are really just for a drop shadow.

_count.backgroundColor = [UIColor clearColor];
_count.layer.masksToBounds = NO;
_count.layer.shadowOpacity = .8;
_count.layer.shadowRadius = 5.0;
_count.layer.shadowColor = [UIColor whiteColor].CGColor;
_count.layer.shadowOffset = CGSizeMake(0.0, 0.0);

Thanks


回答1:


So I determined there was no way to put this kind effect on text there are ways to do an inner glow or a drop shadow as mentioned in the question but no way (that I can find) to add an outer glow to text. I ended up adding a png behind the text to complete a similar (yet not exactly what I was looking for) effect.



来源:https://stackoverflow.com/questions/28015974/xcode-uilabel-text-add-outer-glow-effect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!