title: How can I get a UIWebView's UIScrollView delegate methods called from within a standard UIViewController?
body: <p>So I just have a standard UIViewController with a UIWebView in it that displays a pdf. For the app functionality, I have need to be able to respond to the UIWebView's nested UIScrollView events like scrollViewWillBeginDragging, scrollViewDidScroll, etc. </p>
  
  <p>The only way I can get access to the scrollView is to (it seems like a hack) go in and get it by the subviews array:</p>
  
  <pre><code>for (id subview in webView.subviews){
      if ([[subview class] isSubclassOfClass: [UIScrollView class]])  {
          UIScrollView * s = (UIScrollView*)subview;
          s.delegate = self;
          s.tag = 1;
          scrollView = s;
      }
  }
  </code></pre>
  
  <p>But that seems to introduce more problems than it's worth, because I lose native UIScrollView stuff like zooming.</p>
  
  <p>So to sum up what I'm needing:</p>
  
  <p><strong>What is the best way to set my UIViewController class as the delegate of the UIScrollView inside of the UIWebView?</strong> Is there something I need to do with subclassing my own UIWebView so that it handles events from it's built in UIWebView a certain way and then pass it along somehow to the UIViewController? How does that passing thing work anyway?</p>
  
  <p>Please advise!</p>
  
  <p>Thank you!</p>