title: How do I get a UIViewController given a UITextView?
body: <p>I'm handling code in a UITextViewDelegate.  Each function there receives the UITextView instance that received the event, for example:</p>
  
  <pre>
  - (void)textViewDidBeginEditing:(UITextView*)textView
  {
  
  }
  </pre>
  
  <p>Inside that method however, only given the textView, I need to access the UIViewController that contains the textView.</p>
  
  <p>Using <code>textView.superview</code> (even multiple stages of it) doesn't seem to work - I only get:</p>
  
  <ul>
  <li>textView.superview = an instance of UIView</li>
  <li>textView.superview.superview = UIViewControllerWrapperView</li>
  <li>textView.superview.superview.superview = UINavigationTransitionView</li>
  <li>textView.superview.superview.superview.superview = UILayoutContainerView</li>
  <li>textView.superview.superview.superview.superview.superview = UIWindow</li>
  <li>textView.superview.superview.superview.superview.superview.superview = nil</li>
  </ul>
  
  <p>I found the class names by printing out something like</p>
  
  <pre>
  printf( "class: %s\n", [[[uiv class] description] UTF8String] ) ;
  </pre>