- (CGSize)sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size lineBreakMode:(NSLineBreakMode)lineBreakMode ;
这不是一个特别大得问题, 上面这个方法已经报废了.
请用下面的方法代替.
attributes参数需要你对NSParagraphStyle类有一定的了解,点我过去
e.g.
UIFont *font = [UIFont systemFontOfSize:16.0f];
CGSize size = CGSizeMake(APPFRAME.size.width - 13.0 * 2, 300);
CGSize labelsize = [content boundingRectWithSize:size
options:NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading
attributes:@{NSFontAttributeName:font}
context:nil].size;