SwiftUI
SwiftUI is a declarative framework[1] for building user interfaces for iOS, iPadOS, watchOS, tvOS, visionOS and macOS, developed by Apple Inc. for the Swift programming language. OverviewSwiftUI is declarative, contrasting with the imperative syntax used in other Apple development frameworks such as UIKit and AppKit. SwiftUI allows for 2D drawing, animations, event handling, widgets, and data binding. SwiftUI automatically synchronizes between UI views and data.[2] SwiftUI integrates with other Apple technologies, such as Xcode and Swift Playgrounds to provide for real-time previews during editing,[3][4] alongside support for debugging and other development features. SwiftUI allows for interoperability with UIKit and AppKit views via the HistorySwiftUI was announced at the company's Worldwide Developers Conference (WWDC) on June 3, 2019, and was added in iOS 13 and macOS Catalina.[1] During WWDC 2020 and the iOS 14 release cycle, Apple natively added support for maps with the During WWDC 2021 and the iOS 15 release cycle, Apple added the During WWDC 2022 and the iOS 16 release cycle, Apple released Swift Charts, a framework for making customizable and accessible charts.[9] During WWDC 2023, Apple announced the Apple Vision Pro, and support for the device was added to SwiftUI, alongside new views for AR content such as ExamplesThe following is an example of a simple Hello World program. The import SwiftUI
@main
struct AnApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
struct ContentView: View {
var body: some View {
Text("Hello, World!")
}
}
References
External linksFurther reading
|
Portal di Ensiklopedia Dunia