How can I insert a subview below the other subviews

后端 未结 6 1356
我在风中等你
我在风中等你 2020-12-24 05:45

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 c

6条回答
  •  情书的邮戳
    2020-12-24 06:22

    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

提交回复
热议问题