开发者

CALayer and UIView display order

开发者 https://www.devze.com 2023-01-01 00:19 出处:网络
I have a CATiledLayer within a UIView and the UIView also contains a subview. How can I make sure that the subview is alw开发者_如何学JAVAays drawn above the layer?

I have a CATiledLayer within a UIView and the UIView also contains a subview. How can I make sure that the subview is alw开发者_如何学JAVAays drawn above the layer?

Most of the time I get the tile layer covering the subview.


By default all layers (hence views) added in the last are drawn on the top. You can change the default with -insertSublayer:below: and similar methods:

 [view.layer insertSublayer:tiledLayer below:thatSubview.layer]
0

精彩评论

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