美文网首页
UIView图层层次管理bringSubviewToFront,

UIView图层层次管理bringSubviewToFront,

作者: RhythmMaster | 来源:发表于2017-05-02 10:59 被阅读42次

[将一个UIView显示在最前面只需要调用其父视图的 bringSubviewToFront()方法。

将一个UIView层推送到背后只需要调用其父视图的 sendSubviewToBack()方法。

用第二层子视图 换 第一层子视图的位置 self.view是第0层

[self.view exchangeSubviewAtIndex:1 withSubviewAtIndex:2];

相关文章

网友评论

      本文标题:UIView图层层次管理bringSubviewToFront,

      本文链接:https://www.haomeiwen.com/subject/pmdctxtx.html