I'm trying to disable scrolling for a UIWebView and the only way i found is using this way:
#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);
Is this considered to be an illegal way of using the iPhone SDK? Can this cause my application to be rejected for the App store?