I'm trying to achieve something exactly like this:
I've found a few questions related to mine:
- How to set the colors in glowing effect of a UILabel?
- IPhone Text Glow Effect
- Create glowing text effect on iOS
- xcode UILabel text add outer glow effect
The majority of the answers suggests modifying the UILabel's
layer property by adjusting its shadow, and the questions are outdated.
I've tried the suggestions using the following code:
myLabel.layer.shadowColor = UIColor.black.cgColor
myLabel.layer.shadowOffset = .zero
myLabel.layer.shadowRadius = 2.0
myLabel.layer.shadowOpacity = 1.0
myLabel.layer.masksToBounds = false
myLabel.layer.shouldRasterize = true
And got the following result:
The glow is not strong enough and doesn't disperse out more. I've tried playing around with offset, radius, and opacity but the glow was either the same or less distinct.
Is this still possible or is there a work-around that someone can suggest to me?
Thanks