iphone - Disable UIWebView default scrolling behavior using objective-c -
iphone - Disable UIWebView default scrolling behavior using objective-c -
i know can utilize javascript this
<script type="text/javascript"> touchmove = function(event) { event.preventdefault(); } is there way same using objective-c?
try this...
uiview * v = [[webview subviews] lastobject]; [v setscrollenabled:no]; [v bounces:no]; edit: added checks original reply based on comment below
uiview * v = [[webview subviews] lastobject]; if([v iskindofclass:[uiscrollview class] ]) { if ([v respondstoselector:@selector(setscrollenabled]) { [v setscrollenabled:no]; } if ([v respondstoselector:@selector(bounces)]) { [v bounces:no]; } } iphone objective-c uiwebview
Comments
Post a Comment