title: Resizing UITextView
body: <p>I have a <code>UITextView</code> added on my <code>UIView</code>. The textview added is not editable, it is just to display some data. The data displayed in the textview is dynamic. Thats is the number of lines is not fixed. It may vary. So if the number of line increases, the size of the textview also needs to be increased. I have no clue how to do this. Please give me some ideas.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Here's what I'm doing:</p>
  
  <pre><code>UIView *baseView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 200)];
  baseView.backgroundColor = [UIColor grayColor];
  [window addSubview:baseView];
  
  UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(5, 30, 100, 30)];
  textView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
  textView.text = @"asdf askjalskjalksjlakjslkasj";
  [textView sizeToFit];
  [baseView addSubview:textView];
  </code></pre>