Saravana kumar Saravana kumar - 5 months ago 46
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

This should do the trick:

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