title: ios uitextview auto font size
body: <p>I want auto font size
  Size <code>UITextView</code> want to change the font size is changed.</p>
  
  <p><a href="https://github.com/AndroidDeveloperLB/AutoFitTextView" rel="nofollow">https://github.com/AndroidDeveloperLB/AutoFitTextView</a></p>
  
  <pre><code> if (self.ui_text.contentSize.height &gt; self.ui_text.frame.size.height) {
      int fontIncrement = 1;
      while (self.ui_text.contentSize.height &gt; self.ui_text.frame.size.height) {
          self.ui_text.font = [UIFont fontWithName:@"Copperplate" size:self.ui_text.font.pointSize - fontIncrement];
          fontIncrement++;   
      }
  }else {
      int fontIncrement = 1;
      while (self.ui_text.contentSize.height &gt;= self.ui_text.frame.size.height)    {
          self.ui_text.font = [UIFont fontWithName:@"Copperplate" size:8.0 + fontIncrement];
          fontIncrement++;
  
      }
  }
  </code></pre>