autolayout 入门(二)
来源:互联网 发布:腾讯云域名建站教程 编辑:程序博客网 时间:2024/06/05 01:54
- leftAnchor:左边距
- rightAnchor:右边距
- topAnchor:上边距
- bottomAnchor:下边距
- widthAnchor:宽度
- heightAnchor:高度
- centerXAnchor:中心x
- centerYAnchor:中心y
- leadingAnchor:依赖语言环境设置,对于从左往右阅读语言,比如英语,leadingAnchor = leftAnchor,对于从右往左阅读语言,比如阿拉伯语,leadingAnchor = rightAnchor
- trailingAnchor:依赖语言环境设置,对于从左往右阅读语言,比如英语,trailingAnchor = rightAnchor,对于从右往左阅读语言,比如阿拉伯语,trailingAnchor = leftAnchor
- firstBaseLineAnchor:the baseline of the top row of text
- lastBaseLineAnchor:the baseline of the bottom row of text
leading/trailing 同 left/right的区别
This was covered (briefly) in one of the WWDC 2015 videos on the Mysteries of Autolayout (I think it was part 1 but both are worth watching).
left和right约束是绝对的,总是意指屏幕的左侧和右侧。leading和trailing约束和设备的语言环境有关系。苹果官方的建议是使用leading和trailing约束,如果是绝对布局并且不在意语言环境设置,可以使用left和right约束。
阅读全文
0 0
- autolayout 入门(二)
- autolayout入门(一)
- AutoLayout(二)
- AutoLayout(二)
- AutoLayout(自动布局)入门
- AutoLayout(自动布局)入门
- AutoLayout(自动布局)入门
- AutoLayout(自动布局)入门
- AutoLayout(自动布局)入门
- AutoLayout(自动布局)入门
- AutoLayout(自动布局)入门
- AutoLayout(自动布局)入门
- AutoLayout(自动布局)入门
- AutoLayout(自动布局)入门
- AutoLayout(自动布局)入门
- AutoLayout(自动布局)入门
- IOS6之AutoLayout(二)
- IOS6之AutoLayout(二)
- Java获取当前日期字符串
- 面试题 12: 打印1到最大的n位数
- Qt的4个图像类QImage/QPixmap/QBitmap/QPicture
- android中设置TextView的值\n不起作用
- maven 常用命令
- autolayout 入门(二)
- 数学(3) 各种数学分布,高斯,伯努利,二项,多项,泊松,指数,Beta,Dirichlet
- Brekeke SIP Server搭建
- Caffe中Layer注册机制
- Unity3d 滑动事件--向上、向下、向左、向右(PC好用但是手机滑动不是很理想)
- IDEA没找到新建.java文件解决
- React-Router4x 路由
- openTSDB安装步骤
- spring data mongodb高级查询语句的使用(网上基本没资料)