Is there a way to shrink the font-size in a UITextView if there is too much text? Similar to the UILabel?
A:
Try this:
NSInteger lengthThreshold = 200;
if( [ textView.text length ] > lengthThreshold ) {
NSInteger newSize = ... //calculate new size based on length
[ textView setFont: [ UIFont systemFontOfSize: newSize ]];
}
Jacob Relkin
2010-05-04 01:15:14