title: UITextView aligning text vertically center
body: <p>I want to align text vertically center in <code>UItextView</code>.</p>
  
  <p>I am using following code</p>
  
  <pre><code>UITextView *tv = object;
       CGFloat topCorrect = ([tv bounds].size.height - [tv contentSize].height * [tv zoomScale])/2.0;
       topCorrect = ( topCorrect &lt; 0.0 ? 0.0 : topCorrect );
       tv.contentOffset = (CGPoint){.x = 0, .y = -topCorrect}
  </code></pre>
  
  <p>;</p>
  
  <p>Somehow this doesn't work in iOS 5 as the contentSize returned there is different what I get in iOS6.</p>
  
  <p>Any Idea why <code>contentSize</code> of the same textView is different in iOS 5 and iOS 6?</p>