84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(@0); make.bottom.equalTo(@0); }];
Dynamicly calculate the string height when obtaining data, and set the parent control frame
Related methods: CGRect strRect = [str boundingRectWithSize:CGSizeMake(maxWidth, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : [UIFont systemFontOfSize: fontSize]} context:nil];
CGRect strRect = [str boundingRectWithSize:CGSizeMake(maxWidth, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : [UIFont systemFontOfSize: fontSize]} context:nil];
It’s okay if the height of the parent view is not given. The content will prop it upOf course, if it is a cell, you need to calculate it yourself
The bottom of the bottom view is equal to the bottom of the parent view
Dynamicly calculate the string height when obtaining data, and set the parent control frame
Related methods:
CGRect strRect = [str boundingRectWithSize:CGSizeMake(maxWidth, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : [UIFont systemFontOfSize: fontSize]} context:nil];
It’s okay if the height of the parent view is not given. The content will prop it up
Of course, if it is a cell, you need to calculate it yourself
The bottom of the bottom view is equal to the bottom of the parent view