zoukankan      html  css  js  c++  java
  • UIView的层介绍

    UIView的层介绍

    subview在西安市到屏幕上时,是位于superview上层的。

    同一个view的subview时依照增加的顺序显示相应层的。越晚增加的subview显示在越上层,反之也是如此。

    用superview能够直接管理subview的层。

    -(void)insertSubview:(UIView *)view atIndex:(NSInteger)index;
    //插入一个view到特定层

    -(void)exchangeSubviewAtIndex:(NSInteger)index1 withSubviewAtIndex:(NSInteger)index2;
    //交换两个层的view

    -(void)insertSubview:(UIView *)view belowSubview:(UIView *)siblingSubview;
    //插入一个view到某一个view的下层

    -(void)insertSubview:(UIView *)view aboveSubview:(UIView *)siblingSubview;
    //插入一个view到某一个view的下层

    -(void)bringSubviewToFront:(UIView *)view;
    //将某一个view放在最上层

    -(void)sendSubviewToBack:(UIView *)view;
    //将某一个view放在最下层

    -(void)addSubview:(UIView *)view;
    //加入一个view

  • 相关阅读:
    Elasticsearch 结构化搜索
    KMP 算法
    ElasticSearch 配置
    C++ 入门
    Spark 基础操作
    HBase 与 MapReduce 集成
    iOS面试相关
    iOS开发值得学习的Demo
    Mac系统安装MyEclipse
    linux安装tomcat
  • 原文地址:https://www.cnblogs.com/yfceshi/p/6905932.html
Copyright © 2011-2022 走看看