SwiftUI: Difference between revisions

Content deleted Content added
Aheze0 (talk | contribs)
Fix syntax whitespace and provide more context
UIViewRepresentable is a protocol, not a struct; also mention the protocol for AppKit view interoperability
Line 20:
SwiftUI integrates with other Apple technologies, such as [[Xcode]] and [[Swift Playgrounds]] to provide for real-time previews during editing,<ref name=":0">{{Cite web |title=Previews in Xcode |url=https://developer.apple.com/documentation/swiftui/previews-in-xcode |access-date=2023-11-07 |website=Previews in Xcode – Apple Developer Documentation |language=en |archive-url=https://web.archive.org/web/20231107221047/https://developer.apple.com/documentation/swiftui/previews-in-xcode |archive-date=2023-11-07}}</ref><ref>{{Cite web |title=Swift Playgrounds |url=https://developer.apple.com/swift-playgrounds/ |access-date=2024-01-31 |website=Apple Developer |language=en}}</ref> alongside support for debugging and other development features.
 
SwiftUI allows for interoperability with UIKit and AppKit views via the <code>UIViewRepresentable</code> structand <code>NSViewRepresentable</code> protocols respectively.<ref>{{Cite web |title=Interfacing with UIKit |url=https://docs.developer.apple.com/tutorials/swiftui/interfacing-with-uikit |access-date=2024-01-31 |website=Apple Developer Documentation |language=en-US}}</ref><ref>{{Cite web |title=AppKit integration |url=https://developer.apple.com/documentation/swiftui/appkit-integration |access-date=2024-10-06 |website=Apple Developer Documentation |language=en-US}}</ref>
 
== History ==