我怎样才能在 Storyboard 中实现这一点?
[cell addConstraint:[NSLayoutConstraint constraintWithItem:nameLabel
attribute:NSLayoutAttributeRight
relatedBy:NSLayoutRelationEqual
toItem:cell.contentView
attribute:NSLayoutAttributeLeft
multiplier:1.0
constant:200.0]];
很容易,在 Storyboard 中,控制单击 View 并拖动到另一个 View 。然后点击右侧约束的设置:
然后点击选择和编辑,这将带您进入约束设置:
关于ios - 如何在 Storyboard 中的 UILabel 的右边缘添加前导约束?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23082110/
欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) | Powered by Discuz! X3.4 |