给定字符串的长度, 还有换行方式, 算出高度
1 UIFont * font = [UIFont systemFontOfSize:14]; 2 3 CGSize size = [text sizeWithFont:font xonstrainedToSize:CGSizeMake(140, 1000)lineBreakModel:URLineBreakModelCHaracterWrap];
时间: 2024-09-29 18:26:55
给定字符串的长度, 还有换行方式, 算出高度
1 UIFont * font = [UIFont systemFontOfSize:14]; 2 3 CGSize size = [text sizeWithFont:font xonstrainedToSize:CGSizeMake(140, 1000)lineBreakModel:URLineBreakModelCHaracterWrap];