autoresizingMask属性的意思就是自动调整子控件与父控件中间的位置,宽高,定义如下:

typedef NS_OPTIONS(NSUInteger, UIViewAutoresizing) {
    UIViewAutoresizingNone                 = ,
    UIViewAutoresizingFlexibleLeftMargin   =  << ,
    UIViewAutoresizingFlexibleWidth        =  << ,
    UIViewAutoresizingFlexibleRightMargin  =  << ,
    UIViewAutoresizingFlexibleTopMargin    =  << ,
    UIViewAutoresizingFlexibleHeight       =  << ,
    UIViewAutoresizingFlexibleBottomMargin =  <<
};

UIViewAutoresizingFlexibleLeftMargin 自动调整与superView左边的距离,保证与superView右边的距离不变。
UIViewAutoresizingFlexibleRightMargin 自动调整与superView的右边距离,保证与superView左边的距离不变。
UIViewAutoresizingFlexibleTopMargin 自动调整与superView顶部的距离,保证与superView底部的距离不变。
UIViewAutoresizingFlexibleBottomMargin 自动调整与superView底部的距离,保证与superView顶部的距离不变。
UIViewAutoresizingFlexibleWidth 自动调整自己的宽度,保证与superView左边和右边的距离不变。
UIViewAutoresizingFlexibleHeight 自动调整自己的高度,保证与superView顶部和底部的距离不变。
UIViewAutoresizingFlexibleLeftMargin  | UIViewAutoresizingFlexibleRightMargin 自动调整与superView左右边的距离,保证左右边的距离和原来距左右边距离的比例不变。

其它的组合类似。

UIView 的autoresizingMask属性的更多相关文章

  1. 格而知之2:UIView的autoresizingMask属性探究

    UIView的autoresizingMask属性,是用在当一个UIView实例的父控件的尺寸发生变化时,来自动调整UIView实例在父控件中的位置与尺寸的.autoresizingMask属性是一个 ...

  2. 关于UIView 的autoresizingMask属性,即UIViewAutoresizing

    enum {   UIViewAutoresizingNone                 = 0,   UIViewAutoresizingFlexibleLeftMargin   = 1 &l ...

  3. UIView 的 autoresizingMask 属性 详解。

    转载自:liubo0_0的专栏  链接网址:http://blog.csdn.net/liubo0_0/article/details/7085935 在 UIView 中有一个autoresizin ...

  4. 关于UIView的AutoresizingMask属性的研究

    在 UIView 中有一个autoresizingMask的属性,它对应的是一个枚举的值(如下),属性的意思就是自动调整子控件与父控件中间的位置,宽高. 1 2 3 4 5 6 7 8 9 enum  ...

  5. 关于UIView的autoresizingMask属性的研究【转】

    在 UIView 中有一个autoresizingMask的属性,它对应的是一个枚举的值(如下),属性的意思就是自动调整子控件与父控件中间的位置,宽高. 1 2 3 4 5 6 7 8 9 enum  ...

  6. UIView的autoresizingMask属性

    今天做相册列表的时候,发现有些 UITableViewController 属性不好记忆,然后就查找了一些资料.做一下备份. 在 UIView 中有一个autoresizingMask的属性,它对应的 ...

  7. ios开发之--关于UIView的autoresizingMask属性的研究

    在 UIView 中有一个autoresizingMask的属性,它对应的是一个枚举的值(如下),属性的意思就是自动调整子控件与父控件中间的位置,宽高. enum { UIViewAutoresizi ...

  8. UIView的autoresizingMask属性研究

    在 UIView 中有一个autoresizingMask的属性,它对应的是一个枚举的值(如下),属性的意思就是自动调整子控件与父控件中间的位置,宽高. 1 2 3 4 5 6 7 8 9 enum  ...

  9. 转-关于UIView的autoresizingMask属性的研究

    在 UIView 中有一个autoresizingMask的属性,它对应的是一个枚举的值(如下),属性的意思就是自动调整子控件与父控件中间的位置,宽高. 1 2 3 4 5 6 7 8 9 enum  ...

随机推荐

  1. dplyr包--数据操作与清洗

    1.简介 在我们数据分析的实际应用中,我们可能会花费大量的时间在数据清洗上,而如果使用 R 里面自带的一些函数(base 包的 transform 等),可能会觉得力不从心,或者不是很人性化.好在我们 ...

  2. Visual Studio: whether auto-building when press the debug button

    Tools -> Options -> Projects and Solutions->Build and Run -> choose an option for On Run ...

  3. flex设置成1和auto有什么区别

    首先明确一点是, flex 是 flex-grow.flex-shrink.flex-basis的缩写.故其取值可以考虑以下情况: flex 的默认值是以上三个属性值的组合.假设以上三个属性同样取默认 ...

  4. UVa 11388 & 丝帛

    一直在想丝帛题要不要贴呢...后来觉得还是贴了吧...反正没人看...blog是开给自己看的...偶尔无聊打打blog也显得生活非常充实... 题意: 给一个gcd和lcm求满足啊他们的最小的a和b. ...

  5. 【BZOJ3211&3038】花神游历各国&上帝造题的七分钟2(CodeVS)

    Description   Input   Output 每次x=1时,每行一个整数,表示这次旅行的开心度 Sample Input 4 1 100 5 5 5 1 1 2 2 1 2 1 1 2 2 ...

  6. BZOJ2322: [BeiJing2011]梦想封印

    Description 渐渐地,Magic Land上的人们对那座岛屿上的各种现象有了深入的了解. 为了分析一种奇特的称为梦想封印(Fantasy Seal)的特技,需要引入如下的概念: 每一位魔法的 ...

  7. BZOJ3625: [Codeforces Round #250]小朋友和二叉树

    Description 我们的小朋友很喜欢计算机科学,而且尤其喜欢二叉树.考虑一个含有n个互异正整数的序列c[1],c[2],...,c[n].如果一棵带点权的有根二叉树满足其所有顶点的权值都在集合{ ...

  8. Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_GiftAnimationView"

    1> error 详情: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_GiftAnimationView&quo ...

  9. LUA 配置 运行 异常的备忘录

    1. 抛异常“lua: LuaInterface: cannot instantiate interpreter”,如图: 目前,重新生成dll之后,会多生成一个lua51.dll到\Lua\5.1\ ...

  10. SpringMVC+Shiro权限管理

    什么是权限呢?举个简单的例子: 我有一个论坛,注册的用户分为normal用户,manager用户.对论坛的帖子的操作有这些:添加,删除,更新,查看,回复我们规定:normal用户只能:添加,查看,回复 ...