I have a Label that displays some text like "I am good". How can I calculate the size of text in Label that has custom font. I am calculating size like
CGSize s = [mSubLabel.text sizeWithFont:[UIFont fontWithName:@"ArnhemPro-Blond.otf" size:10.0] constrainedToSize:Max_Size lineBreakMode:UILineBreakModeTailTruncation];
NSLog(@"expected size %@",NSStringFromCGSize(s));
But the size is (0,0)
How can i calculate the size? using GSize subLabelSize=[mSubLabel.text sizeWithFont:[UIFont systemFontOfSize:1] constrainedToSize:Max_Size lineBreakMode:UILineBreakModeTailTruncation];
gives me size but that is not correct.help please...