ios autolayout中NSLayoutAttributeLeft(Right)与NSLayoutAttributeLeading(Trailing)区别
2016-03-02 20:35
706 查看
1、
原文地址:http://blog.csdn.net/yueyeguzhuo/article/details/45310499
NSLayoutAttributeLeft ,
NSLayoutAttributeLeading和 NSLayoutAttributeTrailing 代表从前后进行布局
在天朝 NSLayoutAttributeLeft 和 NSLayoutAttributeLeading 是一个效果的,布局习惯从左到右
使用推荐:NSLayoutAttributeLeading和 NSLayoutAttributeTrailing (比较常用)
2、 http://stackoverflow.com/questions/19971508/difference-between-nslayoutattributeleft-vs-nslayoutattributeleading
原文地址:http://blog.csdn.net/yueyeguzhuo/article/details/45310499
Autolayout使用的时候,相信很多童鞋都有这个疑惑,为啥布局里面会有如下的感觉相同的选项呢
NSLayoutAttributeLeft ,
NSLayoutAttributeRight,
NSLayoutAttributeLeading,
NSLayoutAttributeTrailing,
下面来说一下区别:
NSLayoutAttributeLeft 和 NSLayoutAttributeRight 代表从左右进行布局
NSLayoutAttributeLeading和 NSLayoutAttributeTrailing 代表从前后进行布局
在天朝 NSLayoutAttributeLeft 和 NSLayoutAttributeLeading 是一个效果的,布局习惯从左到右但在有些国家地区,NSLayoutAttributeRight和NSLayoutAttributeLeading 是一个效果,布局习惯从右往左
使用推荐:NSLayoutAttributeLeading和 NSLayoutAttributeTrailing (比较常用)
2、 http://stackoverflow.com/questions/19971508/difference-between-nslayoutattributeleft-vs-nslayoutattributeleading 44down voteaccepted | "Leading" is not always means "Left". For RTL-written languages (locales) leading edge of the object’s alignment rectangle will be located at the right side of the object. Quote from Auto Layout Guide: The attributes leading and trailing are the same as left and right for left-to-right languages such as English, but in a right-to-left environment such as Hebrew or Arabic, leading and trailing are the same as right and left. When you create constraints, leading and trailing are the default values. You should usually use leading and trailing to make sure your interface is laid out appropriately in all languages, unless you’re making constraints that should remain the same regardless of language (such as the order of master and detail panes in a split view).
|
相关文章推荐
- 进程、多线程
- iOS-Gif图片展示N种方式(原生+第三方)
- iOS开发中的多线程的GCD用法
- iOS随机数-备
- iOS,单例
- 【解决方法】iOS 开发小技巧
- iOS 简单常用动画animation
- ios计算文字的大小
- iOS(学习) 一个简单的动画效果
- vios 多 vlan设置
- ios获取视频宽高比分辨率以及旋转角度
- IOS开发之多线程通识
- IOS——线程的应用
- 高德 ios 自定义气泡添加点击事件无效问题
- iOS之九宫格设计和数据模型转换
- iOS开发中关于像素的几个概念
- [iOS学习]Xcode插件的使用
- CFSocket相关(未完待续)
- iOS文件读取方法 节选
- iOS陆先森开发随笔(三)iOS调试技巧(debug)