All skills

Languages & Frameworks

SwiftUI

Overview

SwiftUI is a declarative framework for building user interfaces for iOS, iPadOS, watchOS, tvOS, visionOS and macOS, developed by Apple Inc. for the Swift programming language.

Read more

How it works

swift
struct ContentView: View {
    var body: some View {
        Text("Hello, World!")
            .padding()
    }
}

The flow

Step by step, from source to running.

  1. 1Declare views as Swift structs
  2. 2SwiftUI diffs the view hierarchy
  3. 3State drives automatic updates
  4. 4Renders on iOS / macOS / watchOS

Links

More in Languages & Frameworks