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