A brief introduction about SwiftUI framework
- What's SwiftUI?
- Why/n't SwiftUI?
- Brief: Xcode tools for SwiftUI
- Components to make SwiftUI
- Sample App
- Framework to develop UI in a declarative way for all apple platforms
- Declare UI: We will tell how the ui should look and work, with all the possible states.
- Applicable to all Apple's Platform. It's not write once run anywhere concept, we need changes behaviour of our app for each platform.
- Supports iOS 13 and above
- Rely on UIKit for some features. Need to improvise
- Support all platforms, automatic support for Dynamic Type, Dark Mode, localization, and accessibility.
- No storyboard conflicts
- Code is the only source of truth: AutoSync between code and Canvas
- Preview immediately, fast development
- Less Errors, Unidirectional data flow
- Canvas automatically recognizes and displays any type in the current editor that conforms to the PreviewProvider protocol.
- Live Preview for interactivity and to view UIKit views[UIViewRepresentable]
- AutoSync between code and Canvas
- SwiftUI Inspector to customise views
- Added SwiftUI Views in object library
- Modifiers: cutomise rendering and interactivity. It will return new view and we can chain it.
- Opaque return types: Won't reveal concrete types for encapsulation
- Property wrappers
- @EnvironmentObject
- @State
- @Environment
- @Binding
- @Published
- List: Identifiable, Hashable conformance
- Understand the app through components we learnt