Functions¶
This page contains a list of functions defined in the pyto_ui
module.
-
pyto_ui.
font_family_names
() → List[str]¶ Returns all font family names that can be used to initialize a font.
Return type: List[str]
-
pyto_ui.
image_with_system_name
(name: str) → None¶ Returns a system symbol image from given name. The return value is an UIKit
UIImage
object, so it can only be used on thepyto_ui
library. More info about symbols on Apple’s Web Site .Parameters: name – The name of the SF Symbol. Return type: UIImage
Showing views¶
-
pyto_ui.
show_view
(view: pyto_ui.View, mode: ui_constants.PRESENTATION_MODE)¶ Presents the given view.
This function doesn’t return until the view is closed. You can use another thread to perform background tasks and modify the UI after it’s presented.
On iPad, if the view has a custom size, it will be used for the presentation.
Parameters: - view – The
View
object to present. - mode – The presentation mode to use. The value will be ignored on a widget. See Presentation Mode constants for possible values.
- view – The
-
pyto_ui.
show_view_controller
(view_controller: UIViewController)¶ Shows an UIKit View Controller. This function must be called from the main thread.
See Objective-C and mainthread.
Parameters: view_controller – UIViewController.
System pickers¶
-
pyto_ui.
pick_color
() → pyto_ui.Color¶ Picks a color with the system color picker and returns it.
Requires iOS 14.
Return type: pyto_ui.Color
-
pyto_ui.
pick_font
(size: Optional[float] = None) → pyto_ui.Font¶ Picks a font with the system font picker and returns it.
Return type: pyto_ui.Font