def __make_objc_view__(self): obj = wd.__Class__("WidgetProgress").alloc().init() obj.progress = self.value obj.isCircular = self.circular if self.label is not None: obj.label = self.label.__make_objc_view__() try: obj.color = self.color.__py_color__.managed except AttributeError: pass obj.backgroundColor = self.background_color.__py_color__.managed obj.cornerRadius = self.corner_radius wd.__set_padding__(self.padding, obj) obj.identifier = self.link return obj
""" Apple Watch The 'watch' module provides APIs for building complications and showing UIs on the Apple Watch. """ import widgets as wd import datetime import userkeys as uk import __watch_script_store__ as store from __check_type__ import check from typing import Union, List from threading import current_thread from pyto import Python __PyComplication__ = wd.__Class__("PyComplication") __PyWatchUI__ = wd.__Class__("PyWatchUI") __cached_ui__ = None def _schedule_next_reload(time: Union[datetime.timedelta, float]): check(time, "time", [datetime.timedelta, float, int]) seconds = 0 if isinstance(time, datetime.timedelta): seconds = time.total_seconds() else: seconds = time