I\'ve been using the accepted answer here for years.
On iOS 7, the contentSize.height becomes the frame.height-8, regardless of text content.
What\'s a worki
I wrote a category over UITextView:
- (CGSize)intrinsicContentSize {
return self.contentSize;
}
- (void)setContentSize:(CGSize)contentSize {
[super setContentSize:contentSize];
[self invalidateIntrinsicContentSize];
}
When UIKit sets its contentSize, UITextView adjusts its intrinsic content size. That plays nicely with autolayout.