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.
WebView not allowing me to scroll to the bottom right corner
-
I have an iPad 4 with 720p resolution. When I run this code, the webview prevents me from scrolling to the right.
import ui main = ui.View(frame=(0, 0, ui.get_screen_size()[0], ui.get_screen_size()[1])) wv_container = ui.View(frame=(0, 0, 1920, 1080)) wv = ui.WebView(frame=wv_container.frame) wv.load_url('http://www.example.com') wv_container.add_subview(wv) main.add_subview(wv_container) main.present('fullscreen')
-
import ui main = ui.ScrollView(frame=(0, 0, *ui.get_screen_size())) main.content_size = (1920, 1080) wv = ui.WebView(frame=(0, 0, *main.content_size)) wv.load_url('http://www.example.com') main.add_subview(wv) main.present()
-
@ccc said:
import ui
main = ui.ScrollView(frame=(0, 0, *ui.get_screen_size()))
main.content_size = (1920, 1080)
wv = ui.WebView(frame=(0, 0, *main.content_size))
wv.load_url('http://www.example.com')
main.add_subview(wv)
main.present()Can I do this and still have the
wv_container
? I kinda need my webview inside a separate view :/ -
@uj_jonas instead of making
main
aui.ScrollView
in your code makewv_container
aui.ScrollView
. -
why do you want the webview to be larger than your screen? you should fit the wv to the screen... if the web contents is wider than the screen, the webview will let you scroll inside it.
putting a webview in a scrollview is asking for confusion.
-
@Cethric thanks. Didn't even think of that