title: UITextView inside a UIScrollView inside a Popover is not fully visible when keyboard is displayed
body: <p>I have a <code>UIPopover</code> with a <code>UIScrollView</code>inside it that contains a <code>UITextView</code> at the bottom.  When the keyboard shows, the popover is resized as the text view begins to be edited.  I want the code below to ensure the text view is visible:  </p>
  
  <pre><code>- (void)textViewDidBeginEditing:(UITextView *)textView {
  
      CGRect visRect = textView.frame;
      [self.scrollView scrollRectToVisible:visRect animated:NO];
  
  }
  </code></pre>
  
  <p>The problem is that the code does not make the entire text view visible. Instead, only the text view up to the bottom of the cursor is shown, as shown below:</p>
  
  <p><img src="https://i.stack.imgur.com/0EN6h.jpg" alt="enter image description here"></p>
  
  <p>How can I show the entire text view/ scroll the scrollview to the bottom?  I have tried this:</p>
  
  <pre><code>CGPoint bottomOffset = CGPointMake(0, self.scrollView.contentSize.height - self.scrollView.bounds.size.height);
  [self.scrollView setContentOffset:bottomOffset animated:YES];
  </code></pre>
  
  <p>as explained <a href="https://stackoverflow.com/questions/952412/uiscrollview-scroll-to-bottom-programmatically">in this answer</a> but nothing works.</p>
  
  <p>In addition, my scrollview is scrolled to the position shown AFTER the keyboard is moved into place.  Ideally I'd like the scrolling to happen before or during the keyboard movement.</p>
  
  <p>Any help would be great.</p>