Saravana kumar Saravana kumar - 1 year ago 127
Swift Question

It is Possible to set background image for a label in ios swift?

I want to set background image for a label in my project but i dont know for how to set, please say it is possible or not?

Answer Source

This should do the trick:

yourLabel.backgroundColor = UIColor(patternImage: UIImage(named: "backgroundImage")!)