UIView 的autoresizingMask属性
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属性的更多相关文章
- 格而知之2:UIView的autoresizingMask属性探究
UIView的autoresizingMask属性,是用在当一个UIView实例的父控件的尺寸发生变化时,来自动调整UIView实例在父控件中的位置与尺寸的.autoresizingMask属性是一个 ...
- 关于UIView 的autoresizingMask属性,即UIViewAutoresizing
enum { UIViewAutoresizingNone = 0, UIViewAutoresizingFlexibleLeftMargin = 1 &l ...
- UIView 的 autoresizingMask 属性 详解。
转载自:liubo0_0的专栏 链接网址:http://blog.csdn.net/liubo0_0/article/details/7085935 在 UIView 中有一个autoresizin ...
- 关于UIView的AutoresizingMask属性的研究
在 UIView 中有一个autoresizingMask的属性,它对应的是一个枚举的值(如下),属性的意思就是自动调整子控件与父控件中间的位置,宽高. 1 2 3 4 5 6 7 8 9 enum ...
- 关于UIView的autoresizingMask属性的研究【转】
在 UIView 中有一个autoresizingMask的属性,它对应的是一个枚举的值(如下),属性的意思就是自动调整子控件与父控件中间的位置,宽高. 1 2 3 4 5 6 7 8 9 enum ...
- UIView的autoresizingMask属性
今天做相册列表的时候,发现有些 UITableViewController 属性不好记忆,然后就查找了一些资料.做一下备份. 在 UIView 中有一个autoresizingMask的属性,它对应的 ...
- ios开发之--关于UIView的autoresizingMask属性的研究
在 UIView 中有一个autoresizingMask的属性,它对应的是一个枚举的值(如下),属性的意思就是自动调整子控件与父控件中间的位置,宽高. enum { UIViewAutoresizi ...
- UIView的autoresizingMask属性研究
在 UIView 中有一个autoresizingMask的属性,它对应的是一个枚举的值(如下),属性的意思就是自动调整子控件与父控件中间的位置,宽高. 1 2 3 4 5 6 7 8 9 enum ...
- 转-关于UIView的autoresizingMask属性的研究
在 UIView 中有一个autoresizingMask的属性,它对应的是一个枚举的值(如下),属性的意思就是自动调整子控件与父控件中间的位置,宽高. 1 2 3 4 5 6 7 8 9 enum ...
随机推荐
- 斑点检测(LoG,DoG)(下)
斑点检测(LoG,DoG)(下) LoG, DoG, 尺度归一化 上篇文章斑点检测(LoG,DoG)(上)介绍了基于二阶导数过零点的边缘检测方法,现在我们要探讨的是斑点检测.在边缘检测中,寻找的是二阶 ...
- 【Excel】Excel根据单元格背景色求和
例:用公式计算单元格背景色为浅蓝色的数字之和 步骤一: Office 2003 Insert->Name->Define,Names in workbook输入getColor或ge ...
- 【原】iOS学习43即时通信之XMPP(2)
本篇是 即时通信之XMPP(2) 接上次 即时通信之XMPP(1) 1. 好友列表 1> 初始化好友花名册 // 获取管理好友的单例对象 XMPPRosterCoreDataStorage *r ...
- iOS学习09C语言函数指针
本次主要学习和理解函数指针 1.函数指针 void printValue(int number) { printf("number = %d\n", number); } int ...
- BZOJ4171 : Rhl的游戏
把第一行每个位置设成未知量,对于之后每一行,都可以用第一行的未知量线性表示. 那么只需要加上最后一行的$m$个方程,对于不能按的那$k$个位置也列出对应的方程. 用高斯消元判断是否有解即可,时间复杂度 ...
- BZOJ3485 : [Baltic2012]peaks
首先将每个平原缩成一个点,建出图,相邻两个点之间的边权为它们高度的较小值. 用Kruskal算法求出这个图的最大生成树,每次合并两个连通块时新建一个点指向它们,得到一棵有根树. 对于每个点,求出它子树 ...
- java 程序中添加socks 5代理
在需要使用代理的地方添加如下code: System.getProperties().put("socksProxySet","true"); System.g ...
- Leetcode Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the long ...
- Code[VS]1690 开关灯 题解
Code[VS]1690 开关灯 题解 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 题目描述 Description: YYX家门前 ...
- HDU 4431 Mahjong(模拟题)
题目链接 写了俩小时+把....有一种情况写的时候漏了...代码还算清晰把,想了很久才开写的. #include <cstdio> #include <cstring> #in ...