Skip to content

Latest commit

 

History

History
53 lines (43 loc) · 2.04 KB

219.md

File metadata and controls

53 lines (43 loc) · 2.04 KB
contributors originalUrl
Blackjacx

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

    • InterfaceController inherits WKHostingController
  • Lists WatchOS flash cards app

  • Keep model and List in sync using @ObservedObject

  • Use Command + Click to bring up the inspector and use different contextual options while coding

  • Use .listStyle(.carousel) to get the carousel effect while scrolling the list

  • Swipe to delete, drag to reorder

  • Use .onMove and .onDelete blocks to manage the movement and deletion of items in the list

  • Interactive 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)

  • NotificationController inherits WKUserNotificationHostingController

    • didReceive method allows us to extract info from notification
    • body property is re-evaluated after didReceive is called
  • Digital Crown Series 4 watch can make use of haptic crown (e.g. workout app, custom timer)

    • Building following custom interfaces requires .digitalCrowRotation and .focusable modifier
    • Free 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)