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. 【Cocos2d-x游戏开发】浅谈游戏中的坐标系

    无论是开发2D还是开发3D游戏,首先必须弄清楚坐标系的概念.在Cocos2d-x中,需要了解的有OpenGL坐标系.世界坐标系和节点坐标系.  1.UI坐标系 IOS/Android/Windows ...

  2. Spring MVC Rest 支持CORS

    新建cors filter文件, package cn.ac.iscas.pebble.ufe.tools; import java.io.IOException; import javax.serv ...

  3. java语言特性概述

    一.前言 我们都知道java是面向对象的编程,其中四个基本特性:抽象.封装.继承.多态.这四个特性,概括起来可以这么理解,抽象.封装.继承是多态的基础,多态是抽象.封装.继承的表现. 二. JAVA ...

  4. 解决iPhone中overflow:scroll;滑动速度慢或者卡的问题

    在移动端html中经常出现横向/纵向滚动的效果,但是在iPhone中滚动速度很慢,感觉不流畅,有种卡卡的感觉,但是在安卓设备上没有这种感觉; 要解决这个问题很简单: 一行代码搞定 -webkit-ov ...

  5. 20145308刘昊阳 《Java程序设计》实验三 敏捷开发与XP实践 实验报告

    20145308刘昊阳 <Java程序设计>实验三 敏捷开发与XP实践 实验报告 实验名称 敏捷开发与XP实践 实验内容 XP基础 XP核心实践 相关工具 统计的PSP(Personal ...

  6. The Result of an Interesting and Useful Program on Floating Numbers

    The program: class Program { static void Main() { const double infinity = double.PositiveInfinity; c ...

  7. Codeforces Round #246 (Div. 2) A. Choosing Teams

    给定n k以及n个人已参加的比赛数,让你判断最少还能参加k次比赛的队伍数,每对3人,每个人最多参加5次比赛 #include <iostream> using namespace std; ...

  8. NOIP 2012 Day2T2 借教室题解

    NOIP 2012 Day2T2 借教室题解 题目传送门:http://codevs.cn/problem/1217/ 题目描述 Description 在大学期间,经常需要租借教室.大到院系举办活动 ...

  9. 【HDU】4089 Activation

    http://acm.hdu.edu.cn/showproblem.php?pid=4089 题意: 有n个人排队等着在官网上激活游戏.主角排在第m个. 对于队列中的第一个人.有以下情况:1.激活失败 ...

  10. sencha 安装、学习

     sencha touch 是Extjs 的手机版,Extjs是创建富客户端的AJAX应用中的重量级框架,sencha touch当然就是面向触摸设备的重量级js框架,在做基于桌面的网页时经常用的js ...