#import <objc/runtime.h>
id scroller = [[Webview subviews] lastObject];
int count;
Method *method = class_copyMethodList([scroller class], &count);
int i;
for (i=0; i<count; i++) {
if (strcmp(method_getName(method[i]), "setScrollingEnabled:") == 0)
break;
}
IMP test = method_getImplementation(method[i]);
test(scroller, @selector(setScrollingEnabled:), NO);
Blogged with the Flock Browser

April 5, 2009 at 7:56 am
incredible!
April 24, 2009 at 9:14 pm
Don’t forget to free(method) or you’ll have a leak on your hands.
May 17, 2009 at 4:03 am
or you could just do :
[[[WebView subviews] lastObject] setScrollingEnabled:NO];
this is objective-c, you know
May 20, 2009 at 8:11 pm
Thanks for the post. This was v helpful!
July 15, 2009 at 12:15 pm
not working for 3.0 i guess. it just gives me no such method found.
There is another method called setScrollEnabled but thats giving error
November 6, 2009 at 1:22 pm
id scrollView = [[self subviews] lastObject];
if([scrollView respondsToSelector:@selector(setScrollingEnabled:)]) [scrollView performSelector:@selector(setScrollingEnabled:) withObject:NO];