- 自动布局的核心计算公式
obj1.property1 = (obj2.property2 * multiplier) + constant value
// 禁止autoresizing自动转换为约束
self.view.translatesAutoresizingMaskIntoConstraints = NO;
NSDictionary *views = @{
@"redView" : redView,
@"blueView" : blueView
};
// 自动转换的宏(自动转换成上面字典的结构)
NSDictionary *views = NSDictionaryOfVariableBindings(redView, blueView);
网友评论