Get the NSString height
问题 I have an NSString, and I want to know its height to create an appropriate UILabel. Doing this NSString *string = @"this is an example"; CGSize size = [string sizeWithFont:[UIFont systemFontOfSize:10.0f] forWidth:353.0 lineBreakMode:UILineBreakModeWordWrap]; float height = size.height; height is now 13.0. If I use this string NSString *string = @"this is an example this is an example this is an example this is an example this is an example this is an example this is an example this is an