iphone - Prevent UIWebView from scrolling when datepicker comes into view -
i have form , input field of type date <input type='date'>
. when field tapped datepicker comes view web view scrolls automatically picker becomes visible.
i have tried disabling scrolling , bouncing on web view didn't work i.e. webview.scrollview.scrollenabled = no; webview.scrollview.bounces = no;
any ideas?
you try this:
uiview * v = [[webview subviews] lastobject]; if([v iskindofclass:[uiscrollview class] ]) { if ([v respondstoselector:@selector(setscrollenabled]) { [v setscrollenabled:no]; } if ([v respondstoselector:@selector(bounces)]) { [v setbounces:no]; } }
here check if view responds methods and, if yes, call them.
Comments
Post a Comment