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

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -