iphone - Adding Background image to UILabel -
How can I add a background image to a UILabel in an iPhone app? I tried to do it through IB but no results.
Can someone help me ..
Your answer is moving forward.
Try it with code:
Objective- C:
theLabel.backgroundColor = [UIColor colorWithPatternImage: [UIImage imageNamed: @ "Blah"]];
Swift:
thelabel.backgroundColor = UIColor (Pattern Image: UIImage (named: "blah")! )
or a UIImageView
behind the label (not recommended).
Update: Keeping a UIImageView behind a label was not recommended because you have to manage two ideas. But if you have to do something which only a UIImageView can do it is still a good way, I doubt that your app will actually move like this better.
Comments
Post a Comment