开发者

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

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:

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


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:

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

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

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

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


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


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜