This is a small module for building pyto_ui views with UIKit. Here is an example with UIDatePicker.
import objc_view as ov
from UIKit import UIDatePicker
from datetime import datetime
from typing import Callable
import pyto_ui as ui| """ | |
| A watchOS complication for Pyto showing the current minute of the hour. | |
| The script must be selected in Settings -> Apple Watch Script. | |
| After running the script, | |
| the complication named 'Minutes' should appear in the Watch Face customizer. | |
| """ | |
| import widgets as wd | |
| import watch as wt |
| # Created with Pyto | |
| import widgets as wd | |
| import sf_symbols as sf | |
| import sys | |
| from datetime import time | |
| from UIKit import UIDevice | |
| from background import BackgroundTask | |
| from threading import Thread |
| import widgets as wd | |
| import pyto_ui as ui | |
| import pyto_core as pc | |
| import sys | |
| from rubicon.objc import ObjCClass | |
| from mainthread import mainthread | |
| from time import sleep | |
| UIColorPickerViewController = ObjCClass("UIColorPickerViewController") |
| from extensionsimporter import DownloadableImporter, update_mods, c | |
| from pyto import __Class__ | |
| import sys | |
| import threading | |
| try: | |
| __Class__("PyCore").startupScript = threading.current_thread().script_path | |
| except AttributeError: | |
| pass # Running from startup |
| """ | |
| Tests for Pyto before submitting to the App Store. | |
| """ | |
| import unittest | |
| import runpy | |
| import sys | |
| from apps import Shortcuts | |
| shortcuts = Shortcuts() |
| """ | |
| Installs IPython on Pyto. | |
| Usage: Usage: import requests as r; exec(r.get('https://bit.ly/35iSbM1').content.decode()) | |
| """ | |
| from pip import main as pip | |
| import os.path | |
| docs = os.path.expanduser("~/Documents") |
| """ | |
| A script for importing and exporting Pyto themes. | |
| """ | |
| from rubicon.objc import ObjCClass, at | |
| from console import clear | |
| import sys | |
| import base64 | |
| import sharing |