Alex Rivera | Logout

How can I insert a subview below the other subviews

Asked 2012-04-07T03:33:59.767
40

everyone.

I have some labels that I draw them in the xib file, and add a background view using codes,but the background view is in the front of these labels, so I cant see them. So, my question is how can I add a background view below these labels.

Thank you in advance.

Edit
Report

1 Answer

2

In IB the subviews of a view are listed in a hierarchy under that view. Subviews which appear above their siblings in that hierarchy will appear below them in the rendered view. So in the example below, the in 99:99 AM label appears under the Sign In button at runtime.

If your background is just a UIImageView, consider adding the view to your NIB and then setting its UIImage at runtime. That way, you don't get confused. Also, what Paul.s said.

enter image description here

answered 2012-04-07T03:46:59.553

Your Answer