-(CGSize)automaticGetStringSize:(CGSize)size currentString:(NSString * )currentString textFont:(UIFont *)font{
CGSizelabelsize = [currentString
boundingRectWithSize:size
options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading
attributes:@{NSFontAttributeName:font}
context:nil].size;
returnlabelsize;
}
网友评论