watchOS 6
Independent watchOS apps (decoupled from iOS apps)
Extended run-time sessions
Building experiences: Complications, Notifications, Siri, etc.
Prioritize quick interactions
Full Power of SwiftUI
Declarative syntax Whole new UI framework, new fetures and APIs
Integration Watchkit controllers with SwiftUI Views
InterfaceControllerinheritsWKHostingController
Lists WatchOS flash cards app
Keep model and List in sync using @ObservedObject
Use
Command + Clickto bring up the inspector and use different contextual options while codingUse
.listStyle(.carousel)to get the carousel effect while scrolling the listSwipe to delete, drag to reorder
Use
.onMoveand.onDeleteblocks to manage the movement and deletion of items in the listInteractive Notifications Timely and contextual info
Short look (Info from payload + App icon) Immediately upon wrist raise
Long look (Scrolling interface with custom body and action buttons)
NotificationControllerinheritsWKUserNotificationHostingControllerdidReceivemethod allows us to extract info from notificationbodyproperty is re-evaluated afterdidReceiveis called
Digital Crown Series 4 watch can make use of haptic crown (e.g. workout app, custom timer)
Building following custom interfaces requires
.digitalCrowRotationand.focusablemodifierFree scrolling interface (no concrete spots between elements)
binding (source of truth)
from
through
Picking between discrete elements
binding (source of truth)
from
through
by (stride along which haptic feedback is provided)
Moving around circles (not limited to either end of the sequence)
binding (source of truth)
from
through
by (stride along which haptic feedback is provided)
sensitivity (how much rotation need to be applied to move from one element to the next)
isContinuous (don’t stop at either limit of sequence)
