This module gives you access to the UI.
Pyto supports showing a custom UI for your scripts. To do that, you can directly use UIKit! The ui
modules allows you to show an UIViewController
. To import UIKit classes, write from UIKit import *
. For an example, see the User Interface
example.
main_loop()
This runs a loop while the UI is shown to keep the program running. You should always call this function after showing an interactive UI.
show_view_controller(viewController)
Shows the given View controller.
UIViewController
to show.close_view_controller()
Closes the currently presented View controller.