[英]ios make subview appear on top of CALayer
[[background layer] addSublayer:myLayer];
[background addSubview:toolbar];
I have a UIImageView called background. 我有一个UIImageView称为background。 On top of this I have a subview called toolbar.
在此之上,我有一个称为工具栏的子视图。 Also, I have a CALayer on top of my background.
另外,我的背景之上还有一个CALayer。 The problem is, that I need toolbar to be on top of myLayer.
问题是,我需要工具栏位于myLayer之上。 How to make subview appear on top of layer?
如何使子视图显示在图层顶部?
[background bringSubviewToFront:toolbar];
这样做的错误方法是将zPosition属性设置为-1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.