自动布局之AutoLayout

  • 自动布局的核心计算公式
obj1.property1 = (obj2.property2 * multiplier) + constant value
// 禁止autoresizing自动转换为约束
self.view.translatesAutoresizingMaskIntoConstraints = NO;
 NSDictionary *views = @{
                            @"redView" : redView,
                            @"blueView" : blueView
                            };

 // 自动转换的宏(自动转换成上面字典的结构)
 NSDictionary *views = NSDictionaryOfVariableBindings(redView, blueView);

你可能感兴趣的:(自动布局之AutoLayout)