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.
UI elements in modal scene
-
I am having difficulty adding a ui.View to a modal subclassed scene.
When the scene is run directly, I can add the view in the scene's
setup()
method to the scene'sview
property. However, if the scene is run as a modal scene, itsview
property isNone
.That's not too big a deal. I can just run the modal scene and then trigger the
ui.View
to be added after it's being presented. But where should theui.View
be added? I can add it to the parent scene'sview
, but then it doesn't disappear when the modal scene is dismissed.How should this work?
Here's a gist with what I have with so far (main application logic redacted).
-
Perhaps you want to be presenting a modal view, not a modal scene?
For instance, present your login view as a popover or sheet, then wait_modal on the view to wait until it is closed.