I have a serious problem that I just canβt fix, and it makes me crazy for the last two days. I have searched all over the world and I cannot find a solution, although I have tried a lot.
I have a UITextView inside a UIScrollView . I can dynamically resize the UITextView inside the scroll to display the text. But when the UITextView contains very large text, it is cropped when I scroll to the very end. However, the UIScrollView frame is still properly configured.
I read these posts: this and many others.
UIScrollView and UITextView are created in xib using AutoLayout.
Here is my current code and screenshot, as you can see that the empty space in the screenshot should be filled with text. please help.

- (void)viewDidAppear:(BOOL)animated { CGRect frame = self.longDescField.frame; frame.size.height = self.longDescField.contentSize.height; self.longDescField.frame = frame; self.scrollView.contentSize = CGSizeMake(self.view.frame.size.width, self.longDescField.contentSize.height + 200); self.scrollView.scrollEnabled = YES; [self.scrollView flashScrollIndicators]; }
ios iphone uitextview uiscrollview
sudo Sep 09 '13 at 10:59 on 2013-09-09 10:59
source share