[英]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.