Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Access to WebView's ScrollView
-
Hello
I have a need to disable scrolling for a WebView, but even if UIWebView has a scrollView attribute to provide access for doing this, the attribute has not been exposed in Python.
Pending a Pythonista update, any ideas how to either get access to the underlying ScrollView of an already existing WebView, or how to disable scrolling in some other manner?
Thanks,
Mikael -
This should work:
from objc_util import * import ui webview = ui.WebView() scrollview = ObjCInstance(webview).subviews()[0].scrollView() scrollview.setScrollEnabled_(False) webview.load_url('http://stackoverflow.com') webview.present()
-
Thanks! Both for the to-the-point reply - and the 20-minute response time.