Create glowing text effect on iOS

前端 未结 2 2009
栀梦
栀梦 2020-12-31 18:45

We\'re currently building an iPhone app and would like the text to have a glowing effect to fit in with the realistic UI design.

Here is what we\'re trying to achiev

2条回答
  •  旧时难觅i
    2020-12-31 19:38

    Updating the code posted by pasawaya:

    label.layer.shadowColor = ([UIColor .green] as! CGColor)
    label.layer.shadowOffset = CGSize.zero
    label.layer.shadowRadius = 10.0;
    label.layer.shadowOpacity = 0.
    label.layer.masksToBounds = false
    

提交回复
热议问题