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.
View.close()
-
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.
-
I was quite certain that there was a
View.will_close
method, but I can't find it in the docs. Maybe I'm imagining things. Other solutions could beView.wait_modal()
(which blocks execution and returns once the view is no longer visible) or adding a custom close button that callsView.close()
and then runs the "cleanup" code. -
will_close
does work, but you have to make a custom View class.
http://omz-software.com/pythonista/docs/ios/ui.html#building-custom-views(Edit:added reference)
-
See
close_action()
andclose_button()
inhttps://github.com/671620616/PhantomChess/blob/master/Phantom/gui_pythonista/game_view.py
which creates a custom closeX
to allow you to hide the title bar to maximize screen real estate for your content.