![](/img/trans.png)
[英]iOS The viewcontrollers in the storyboard are grouped into another storyboard
[英]How to handle Storyboard ViewControllers in iOS?
ADD THIS TO YOUR CODE:
CGSize maximumLabelSize = CGSizeMake(296, FLT_MAX);
CGSize expectedLabelSize = [yourString sizeWithFont:yourLabel.font constrainedToSize:maximumLabelSize lineBreakMode:yourLabel.lineBreakMode];
CGRect newFrame = yourLabel.frame;
newFrame.size.height = expectedLabelSize.height;
yourLabel.frame = newFrame;
添加此代碼
[你的標簽 sizeToFit ]; 或 [yourView sizeToFit];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.