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. 

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:

for (id subview in webView.subviews){
    if ([[subview class] isSubclassOfClass: [UIScrollView class]])  {
        UIScrollView * s = (UIScrollView*)subview;
        s.delegate = self;
        s.tag = 1;
        scrollView = s;
    }
}


But that seems to introduce more problems than it's worth, because I lose native UIScrollView stuff like zooming.

So to sum up what I'm needing:

What is the best way to set my UIViewController class as the delegate of the UIScrollView inside of the UIWebView? 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?

Please advise!

Thank you!


Question: How to make extra crispy and crunchy breading like KFC?
Answer: I normally use all purpose flour cornmeal onion powder garlic powder paprika and meat tenderizer.Just wet the chicken with water or with marinade,toss in a ziploc with flour and seasonings.Then fry for 20 or 25 min in the fry daddy and presto!!!!