Heim > Fragen und Antworten > Hauptteil
PHP中文网2017-04-18 09:23:28
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(@0);
make.bottom.equalTo(@0);
}];
迷茫2017-04-18 09:23:28
获得数据时动态计算字符串高度, 设置父控件frame
相关方法: CGRect strRect = [str boundingRectWithSize:CGSizeMake(maxWidth, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName : [UIFont systemFontOfSize: fontSize]} context:nil];