title: Scroll UITextView To Bottom
body: <p>I am making a an app that has a <code>UITextView</code> and a button. </p>
  
  <p>When I click the button some text will add in the <code>UITextView</code>. </p>
  
  <p>But when clicking the button, I wan't to scroll down to the bottom of the text field so the user can see the last text added.</p>
  
  <p>How to make the <code>UITextView</code> to scroll down to the bottom?</p>
  
  <p>I tried:</p>
  
  <pre><code>int numLines = LogTextView.contentSize.height / LogTextView.font.lineHeight+1;
  NSLog(@"%d",numLines);
  
  NSUInteger length = self.LogTextView.text.length;
  self.LogTextView.selectedRange = NSMakeRange(0, length);
  </code></pre>
  
  <p>but it will not work...</p>
  
  <p>I also tried:</p>
  
  <pre><code>self.LogTextView.contentSize=CGSizeMake(length,0);
  </code></pre>