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.
donnieh last edited by
Is there a function or action I can refer to when a view is closed after view.present()?
I want to call a function when closed. In my case, I close the view with the left blue X in the title bar.
dgelessus last edited by
I was quite certain that there was a
View.will_closemethod, but I can't find it in the docs. Maybe I'm imagining things. Other solutions could be
View.wait_modal()(which blocks execution and returns once the view is no longer visible) or adding a custom close button that calls
View.close()and then runs the "cleanup" code.
JonB last edited by
will_closedoes work, but you have to make a custom View class.
ccc last edited by
https://github.com/671620616/PhantomChess/blob/master/Phantom/gui_pythonista/game_view.pywhich creates a custom close
Xto allow you to hide the title bar to maximize screen real estate for your content.