How to send objects in NIB files to front/back?

后端 未结 6 759
清歌不尽
清歌不尽 2020-11-29 22:32

How can I adjust the \"z\"-positions of objects (e.g. sending UIImageViews to the front/back) in the integrated interface builder in Xcode?

6条回答
  •  無奈伤痛
    2020-11-29 23:10

    I know originally, this question was for Xcode 4, but it is linked from a Google search.

    In Xcode 5, 6, and 7, you can still go to the Editor menu and select and move the items around.

    Image of Editor Menu

    But you can also rearrange by simply changing the order in the document outline.

    Example of UI Items in a UIView

    They're in reverse z-index order: the top of the list is the back of the stack, the bottom of the list is the front. Simply drag your UI item to the bottom to bring it to the front.

提交回复
热议问题