|-5-[_modeSwitchButton(22)]-5-[_editView]-8-[_inputViewButton(25)]-10-|
这个是 距离左边5 _modeSwitchButton(长度22)距离_editView5 距离_inputViewButton8 (长度25)距离右边10 这样?
V:|[_modeSwitchButton]| 为什么这个有个V 我把V去掉控件就没了
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@”|-5-[_editView]-8-[_inputViewButton(25)]-10-|”
options:0 metrics:nil views:views]];
}
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@”V:|[_inputViewButton]|” options:0 metrics:nil views:views]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@”V:|-5-[_editView]-5-|” options:0 metrics:nil views:views]];
这个是 距离左边5 _modeSwitchButton(长度22)距离_editView5 距离_inputViewButton8 (长度25)距离右边10 这样?
V:|[_modeSwitchButton]| 为什么这个有个V 我把V去掉控件就没了
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@”|-5-[_editView]-8-[_inputViewButton(25)]-10-|”
options:0 metrics:nil views:views]];
}
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@”V:|[_inputViewButton]|” options:0 metrics:nil views:views]];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@”V:|-5-[_editView]-5-|” options:0 metrics:nil views:views]];
解决方案:20分
放弃自动布局库吧。少年,试试这套界面布局库:https://github.com/youngsoft/MyLinearLayout