Open lieyunye opened 8 years ago
NSAttributedString *attributedText =[[NSAttributedString alloc] initWithString:text attributes:@{ NSFontAttributeName: font}]; CGRect rect = [attributedText boundingRectWithSize:CGSizeMake(CGRectGetWidth([UIScreen mainScreen].bounds), 60) options:NSStringDrawingUsesLineFragmentOrigin context:nil];
attributedText should release!!!
Are you not supposed to be using ARC?
NSAttributedString *attributedText =[[NSAttributedString alloc] initWithString:text attributes:@{ NSFontAttributeName: font}]; CGRect rect = [attributedText boundingRectWithSize:CGSizeMake(CGRectGetWidth([UIScreen mainScreen].bounds), 60) options:NSStringDrawingUsesLineFragmentOrigin context:nil];
attributedText should release!!!