title: Why isn't my UIViewController in the responder chain for its view?
body: <p>I have written a subclass of UIViewController which creates a view programmatically, instead of loading it from a NIB file.</p>
  
  <p>It has a simple <code>loadView</code> method:</p>
  
  <pre><code>- (void)loadView
  {
      UIScrollView *mainScrollView =
          [[UIScrollView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
      self.view = mainScrollView;
      [mainScrollView release];
  }
  </code></pre>
  
  <p>...then I do the bulk of my initialization in <code>viewDidLoad</code>, as documented.  It all works, and I can see the scroll view with my custom views in it.</p>
  
  <p>I need a UIViewController to own the view because it's part of a UINavigationBar workflow.  Since I have a controller object, I'd rather it do the controller stuff.</p>
  
  <p>The problem, then, is my view controller does not seem to be in the responder chain.  <code>touchesBegan:withEvent:</code> is invoked if I define it in the root view or a subview, but not if it's in the view controller itself.</p>
  
  <p>Apple event handling documentation glibly mentions the <a href="http://developer.apple.com/IPhone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/EventHandling/EventHandling.html#//apple_ref/doc/uid/TP40007072-CH9-SW2" rel="nofollow noreferrer">view controller should be in the responder chain</a>.  UIViewController documentation says nothing about extra steps needed beyond assigning the root view to the <code>self.view</code> property, as I've done above.  UIResponder documentation claims a UIView should figure out if it has a controller and pass the event to it.  UIScrollView documentation says nothing at all.</p>
  
  <p>I've also experimented with various settings of <code>userInteractionEnabled:</code> for all views and subviews, with no luck.</p>
  
  <p>What am I missing?</p>