WWDC19
Table of Contents
=================
Integrating SwiftUI - Thursday
Session materials: https://developer.apple.com/videos/play/wwdc2019/231/
Hosting Controller
- Wraps swiftUI hierarchy into a view controller
- Subclass of
UIViewController rootViewproperty represents a SwiftUI view-
let hostingController = UIHostingViewController(rootView: A_SWIFTUI_VIEW) setNeedsBodyUpdate()&updateBodyIfNeeded()
Embedding Existing Views into SWiftUI
RepresentableProtocol- Wraps UIKit/AppKit views
- make -> update -> dismantle views

Integrating Your Data Model
- Use
@BindableObjectprotocol in the custom model to pass it to the SWiftUI