I have a class which is a subclass of webView
. I need to do some calculations when scrollview
of webView gets zoomed or gets scrolled. The content loaded in webView are pdf files. In iOS 5 I am getting scrollView with:
[super scrollView]
and in iOS 4:
for (id subview in webView.subviews)
if ([[subview class] isSubclassOfClass: [UIScrollView class]])
return subview;
It's working fine with iOS 5 but in iOS 4 when I change the delegate of scrollView I can no longer zoom in/out the webView.
Any thoughts how can I change the delegate of that scrollView?
I implemented something like this:
Then I return:
In my case, I keep a singleton ProxyScrollView for my webView and return that.