I am trying to get a CGSize for an NSString but I am having issues. Here is the code I am using:
CGFloat actualMessageFontSize;
CGSize messageSize =
[message sizeWithFont:[UIFont fontWithName:@"Helvetica-Bold"
size:14.0f]
minFontSize:14.0f
actualFontSize:&actualMessageFontSize
forWidth:(alertViewWidth - textIndent)
lineBreakMode:NSLineBreakByWordWrapping];
I NSLog the CGSize after this code and the height doesn’t change, even if I put a massive NSString into it. Do you know why this might happen and or what I should try instead?
Thanks.
use this method and
and use it like bellow… i use this for
UILablesee the code..