Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.15 KB

swiftui-essentials.md

File metadata and controls

42 lines (29 loc) · 1.15 KB

SwiftUI Essentials

Presenter: Taylor Kelly, SwiftUI Engineer

Link: https://developer.apple.com/wwdc24/10150

Why SwiftUI?

  • Rich features
  • Less code
  • Incremental adoption

Fundamentals of Views

  • Basic building blocks of user interfaces

  • Every pixel you see on screen defined by a view

  • Declarative vs. imperative

  • Compositional

  • State-driven

Built-in capability

  • Supports dark mode
  • Dynamic type
  • SwiftUI Previews let you see stuff as you develop
  • Adaptive quality - views display relevant to context - i.e. Button changing its apperance

Across all platforms

  • Build native apps for any Apple platform
  • Multiplier on efforts - UI built for one platform is a good head-start for apps built for other platforms
  • Common set of components across platforms, but also specialized APIs across platforms
  • "Learn once, use anywhere" - not "write once, use anywhere"

SDK interoperability

  • SwiftUI comes with each platform's SDK
  • Apps can pick-and-choose frameworks that provide compatibilities
  • SwiftUI provides interoperability
  • UIKit and AppKit are imperative, different patterns
  • Use a view representable to use UI or NS views within SwiftUI