copenndthagen
copenndthagen

Reputation: 50790

add background image in iphone using IB

I want to add a background image for some labels in my custom view. How do I add the same? If I use UIImageView, it comes as foreground image.

Upvotes: 1

Views: 854

Answers (3)

Bogatyr
Bogatyr

Reputation: 19333

It's easy to control visibility in IB, just view the .xib file in list mode. Items listed farther down in the list appear on top of elements above them in the list. So to place a background image under a label, drag the UIImageView into the view, and drag it to be above the labels in the view list. Like this:

enter image description here

Upvotes: 1

Zaky German
Zaky German

Reputation: 14334

Double click the specific imageview in IB, then select Layout from the top menu, and click send to back. Or do the same with the label but select bring to front :)

Upvotes: 1

Max
Max

Reputation: 16709

You should add that labels as subviews for that image view.

Upvotes: 0

Related Questions