开发者

How to set the priority of several layers in iPhone?

Hey there, I am trying to add a new image on an existing sublayer in 开发者_JAVA百科iphone. However, I found that the image was always "behind" the sublayer. So, could anyone please tell me how to set the priority of different layers and image views?

Thank you for your time and help.


The views are shown in the order they were added to the parent view.

[parent addSubView:a];
[parent addSubView:b];
[parent addSubView:c];

c will be on top of b which will be on top of a.

You can always bring any of the subviews to the top by calling

[parentView bringSubviewToFront:a];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜