AutoresizingMask
设置的View,是相对于父容器,固定左边距,固定右边距等。
AutoLayout
官方解释:
AutoLayout是一种基于约束的,描述性的布局系统。
Auto Layout Is a Constraint-Based, Descriptive Layout System.
其实就是跟Android的相对布局(RelativeLayout)很像;
storyboard上开启AutoLayout
代码里面需要关闭AutoresizingMask
[self.decLabel setTranslatesAutoresizingMaskIntoConstraints:NO];