[英]Change frames of UILabel using Auto layouts based
您可以通過AutoLayout constraints
來實現此AutoLayout constraints
,可以遵循兩種方法之一
IBOutlet
, oneLabelHeightConstraint.constant = <value you want>
或者設置其他標簽heightConstraint.constatn = 0
bottomLabel
top
固定在一起,然后在bottomLabel
以及要顯示topLabel
時添加height
約束,並設置bottomLabelHeightConstraint.constant = 0
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.