UILabel *label = [[UILabel alloc] init]; //根据内容动态计算label的高度 label.text = @"Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions"; //1.获取label当前使用的字体 UIFont *labelFo…
To make your label automatically resize height you need to do following: Set layout constrains for label Set height constraint with low priority. It should be lower than ContentCompressionResistancePriority Set numberOfLines = 0 Set ContentHuggingPri…