I need to show a body of text similar to the one shown below and limited to the red non-rectangular area. Rob's answer to this question pretty much answers my question as well, but I also need to truncate at tail of the paragraph when the text is too long.
Extra question: is it also possible to set minimum font size similar to UILabel?
Try using
NSString::sizeWithFont:constrainedToSize
method which is documented here. You can specify the fontsize and maximum size for the text.You can also calculate the minimum font size using
NSString::sizeWithFont:minFontSize:actualFontSize:forWidth:lineBreakMode:
method.