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

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -