Whenever an & is present on the text, getting the height seems to be off all the time. Both functions return less than the actual height:
CGSize labelSize = [nameLabel.text sizeWithFont:nameLabel.font constrainedToSize: CGSizeMake( actualWidth, MAXFLOAT ) lineBreakMode:UILineBreakModeWordWrap];
CGRect textSize = CGRectMake(0.0, 0.0, 320.0, FLT_MAX);
nameLabel.frame = [nameLabel textRectForBounds:textSize limitedToNumberOfLines:0];
None of them would return the correct height though the 2nd method using textRectForBounds returns a much closer actual height. The former would return 240 but the later would return 700. The actual is 750.
This messes up my UITableView showing texts that are overlapping on top of each other.
Interestingly, the would return the same height as long as the text does not contain any & character.
Can someone enlighten me please as for the life of me I don't understand what's going on in here and know how to fix this correctly.
Thanks so much in advance.