I am using below code to calculate the size for the label for a string.
NSString * str = @"It's \n that \n don't \n";
CGSize size = [str sizeWithFont:[UIFont fontWithName:@"Verdana" size:12.5] forWidth:300
lineBreakMode:UILineBreakModeWordWrap];
NSLog(@"Height : %f Width : %f ",size.height,size.width);
But id does not consider \n characters from the string to change the line. When I display this string on a label and set it numberOfLines property to some 4 or 5 , label does consider the \n and go to the next line. How can I calculate the height for the lable considering the \n's from the string. Please help me .
Thank You !!!