, UITextview. iOS 6, addSubview (, UIScrollView) (.. Frame.size.height). iOS 7 - sizeToFit .
, , sizeToFit, layoutIfNeeded ( ) :
...
[scrollView1 addSubview: myTextView];
[myTextView sizeToFit];
[myTextView layoutIfNeeded];
CGRect frame = myTextView.frame;
...
This is from the accepted answer here , see notes. My attempt at explanation is given here if this is not valid for UITextviews that are added to UITableViewCells instead of UIScrollViews (for some reason).
source
share