使用该NSLayoutAttributeCenterX属性时,乘数为1会产生与引用视图匹配的中心.增加值会将其向左移动,向0移动会将其向右移动.
NSLayoutAttributeCenterX
我已经能够实现大致通过使用2.5乘法器,1,和0.625我想要的结果通过试错(在超级视图均匀间隔3次).在弄乱的时候,我发现200在被引用视图的左边缘居中(也增加了比不移动视图更多),并且0.5在右边缘居中(朝0减小会使视图进一步向左移动) .
所以这是我的问题:
ios autolayout nsautolayout ios-autolayout
autolayout ×1
ios ×1
ios-autolayout ×1
nsautolayout ×1