title: Setting the UITextView height to fit the content height in Objective c
body: <p>I have the code as below for my UITextView set up.</p>
  
  <pre><code>CGRect itemDescFrame = CGRectMake(20, 160, 280, 200);
  UITextView *itemDesc = [[UITextView alloc] initWithFrame:itemDescFrame];
  ...
  itemDesc.editable = NO;
  itemDesc.scrollEnabled = NO;
  ...
  </code></pre>
  
  <p>I have disabled the UITextView scroll bar, however some of the content on the bottom is being hidden. How can I set the UITextView height to fit to the content height?</p>
  
  <p>Thanks</p>
  
  <p>UPDATE:</p>
  
  <pre><code>NSLog(@"frame %@", itemDesc.frame.size.height);
  NSLog(@"content %@", itemDesc.contentSize.height);
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>2011-10-11 11:00:18.010 abc[1606:207] frame 200.000000
  2011-10-11 11:00:18.010 abc[1606:207] content 200.000000
  </code></pre>