How to assign different z-order to my Interface Builder objects?
Asked Answered
H

3

14

How can I change the z-value, or just send to back or to front the objects in Interface Builder?

i.e. I would like to move to front the "Label" in this View:

example image

Hemphill answered 8/5, 2011 at 11:50 Comment(0)
M
27

You need to reorder then in Interface Builder. It seems like you're using Xcode 4. So, first, click on the arrow in the bottom left corner of IB to expand the side panel:

enter image description here

Next, click and drag the views that you'd like to rearrange.

enter image description here

The lower an item is on the list from the top of the list, the higher its "z-index".

Median answered 8/5, 2011 at 11:57 Comment(0)
S
2

with that object selected, goto (menu) Editor>Arrangement> . There will be 4 options with activated appropriate options.

Stepchild answered 8/5, 2011 at 19:51 Comment(1)
For some reason when I do this none of the options are activated. What could I be doing wrong?Eulalie
L
0

xCode 10.3 (2019):

I had the same problem when copying/pasting a background image view. I couldn't drag it to change its z-order in the Document Outline panel (in Interface Builder).

The answer was just to restart xCode.

I think that re-indexed/re-built the storyboard and I could drag it higher in the list (thus making it lower in the z-order + behind the other controls).

Ledger answered 14/9, 2019 at 13:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.