I have used a UIWebView to simply show a string, with font size 14px (declared in style)
the string occupies approximately 1/4 - 1/3 of the iphone screen (in height) with restriction of width of 190
then I use NSString sizeWithFont: constrainedToSize: to detect how large is exactly this string.
UIFont *font = [UIFont fontWithName:@"ArialMT" size:14.0f];
CGSize titleConstraint = CGSizeMake(190, 440);
CGSize tSize = [s sizeWithFont:font constrainedToSize: titleConstraint lineBreakMode:UILineBreakModeWordWrap];
the tSize.height is printed out as 85
But actually I think it is more than 120, 1/4 - 1/3 of the screen height.
Why there is such a diff between the string size measurement and the actual UIWebView ?
the problem is the size of the UIFont is not the same as 14px? (in UIWebView, font size is 14px, in string sizeWithFont I used font size 14.0f)
If it is, how should I transfer html px font size to iPhone UIFont size?
thanks