NSString *aboutStr = [NSStringstringWithFormat:@"简介:%@", provicerInfo.Summary];
self.aboutLabel.text = aboutStr;
CGRect rect = [aboutStrboundingRectWithSize:CGSizeMake(self.aboutLabel.bounds.size.width,CGFLOAT_MAX)options:NSStringDrawingUsesLineFragmentOriginattributes:@{NSFontAttributeName:self.aboutLabel.font}context:nil];
只需要获取长度的话用
CGSize rect=[testModel.name sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:17]}];