Prior to ios5, I was able to access the UIWebView UIScrollView delegate as follows:
for (id subview in webView1.subviews){ if ([[subview class] isSubclassOfClass: [UIScrollView class]]) { UIScrollView * s = (UIScrollView*)subview; OldDelegate = s.delegate;
Now I know that this is not the right way to do this, but at the time (as I understand it) it was the only way to do this. iOS 5 changed this, so I'm trying to do it using iOS 5:
UIScrollView * s = webView.scrollView; Olddelegate = s.delegate; s.delegate = self;
But in any case, I'm trying to do this, the value of my OldDelegate object is 0x0. It is very important that I keep this delegate value, but try as best as I can, I just get 0x0.
Any ideas?
I do not use ARC ...
Lizza source share