Note that there are some explanatory texts on larger screens.

plurals
  1. POLarge Text Being Cut Off in UITextView That is Inside UIScrollView
    primarykey
    data
    text
    <p>I'm having a serious problem that I just can't seem to fix and it's driving me insane for the last two days. I have searched far and wide and I can't find a solution, even though I have tried many.</p> <p>I have a <code>UITextView</code> inside a <code>UIScrollView</code>. I am able to dynamically resize the <code>UITextView</code> inside the scrollview to display the text. But when the <code>UITextView</code> contains very large text it gets cut off when I scroll almost to the end. However, the <code>UIScrollView</code>'s frame is still being sized correctly.</p> <p>I read these posts: <a href="https://stackoverflow.com/questions/16836707/uitextview-text-cut-off-when-there-is-a-large-amount-of-text">this</a> <a href="https://stackoverflow.com/questions/7823229/uitext-content-size-in-ui-scroll-view-the-text-in-bottom-is-cut-off">this</a> and many similar ones.</p> <p>The <code>UIScrollview</code> and <code>UITextview</code> are both created in the xib using AutoLayout.</p> <p>Here is my current code and a screenshot as you can see the blank spot in the screenshot should be filled with text. please help. </p> <p><img src="https://i.stack.imgur.com/f5M5l.png" alt="enter image description here"></p> <pre><code>- (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]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload