ztk::ios::app
Shows a screen, a navigation stack, or a tab screen as the whole window of the app, in place of the Tk window.
Synopsis
ztk::ios::app root ?OBJECT?
Arguments
| Name |
Type |
Default |
Meaning |
root |
subcommand |
|
Sets the root of the window. |
OBJECT |
screen, navigation stack, or tab screen |
none |
The object to show. With no object, the Tk window shows again. The Tk widgets keep their state while a native root shows. |
Return value
An empty string.
Errors
| Error |
When |
"OBJECT" is not a screen, a navigation stack, or a tab screen |
OBJECT is a control, an alert, or no object of ztk::ios. |
unknown or ambiguous subcommand "SUB": must be root |
The subcommand is not root. |
wrong # args: should be "ztk::ios::app root ?object?" |
More than one object. |
| Platform |
Works |
| Windows |
No |
| macOS |
No |
| Linux, Wayland |
No |
| Linux, X11 |
No |
| Web |
No |
| iOS |
Yes |
| Android |
No: ztk::android::app |
| Headless |
No: the namespace does not exist. |
Example
set screen [ztk::ios::Screen new -title Hello]
$screen add button -text "Back to Tk" -command {ztk::ios::app root}
ztk::ios::app root [ztk::ios::NavigationStack new $screen]
See also