Dan A Dan A - 8 months ago 68
Swift Question

Make UILabel appear on top of UIImageView in storyboard

I want to make the a label appear over an image view. But when I place the label over it it disappears. Whats the best way around this?

I have a couple of labels over my image view. When I build and run it the labels appear fine. But on the storyboard when I place ui items such as a label over my image view it doesn't show. How can I make this show

Image

As seen on the screen shot I can't see my labels
It appears when I build and run but on the story board the image view hides it this is still a problem.

Answer Source

In a story board, if you place the label on top of the image view it will appear that way. Just make sure that you have the proper constraints on both the image view and the label so that they would be on top of each other and it should work. To answer your question, putting a label on top of an image view does not make it disappear.

This would put the label in front of the image view:

This would put the label in front of the imageview

and this would put it behind the imageview

and this would put it behind the imageview

Just replace the order from the side menu in storyboard. Put it below the image view and it will be on top

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download