动态适应多行字符串的宽、高度:
UIFont * font = [UIFont fontWithName:@"HelveticaNeue" size:20];
CGSize size = [@"agaergea" sizeWithAttributes:[NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName]];
//size的高度
size.height
//size的宽度
size.width
动态适应多行字符串的宽、高度:
UIFont * font = [UIFont fontWithName:@"HelveticaNeue" size:20];
CGSize size = [@"agaergea" sizeWithAttributes:[NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName]];
//size的高度
size.height
//size的宽度
size.width