[英]How to add leading constraint to the right edge of the UILabel in storyboard?
我怎样才能在故事板中达到这个效果?
[cell addConstraint:[NSLayoutConstraint constraintWithItem:nameLabel
attribute:NSLayoutAttributeRight
relatedBy:NSLayoutRelationEqual
toItem:cell.contentView
attribute:NSLayoutAttributeLeft
multiplier:1.0
constant:200.0]];
很容易,在情节提要中,控制单击视图并拖动到另一个视图。 然后点击右侧的约束设置:
并单击“选择和编辑” ,这将带您进入约束设置:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.