April 2020
Beginner
316 pages
8h 20m
English
With catalyst being announced alongside SwiftUI and the option for developers to build native macOS apps straight off the back of their iPadOS apps, it only makes sense to allow the same behavior to be able to create SwiftUI apps in macOS just like you can on iOS and iPadOS.
With almost identical options to iOS, macOS offers the following in terms of the representable protocol:
struct TestRepresentableView: NSViewRepresentable { func makeNSView(context: NSViewRepresentableContext<TestRepresentableView>) -> NSTextView { return NSTextView() } func updateNSView(_ nsView: NSTextView, context: NSViewRepresentableContext<TestRepresentableView>) { // ... } static func dismantleNSView(_ nsView: NSTextView, coordinator: ()) { ...Read now
Unlock full access