Instruction

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

SwiftUI

SwiftUI is Apple’s new declarative UI framework for building apps across all of their platforms. Unlike UIKit and AppKit, which are based on Objective-C, SwiftUI is built for Swift using modern programming paradigms. One of these is moving away from inheritance and using protocols to build your views instead.

SwiftUI Views

In SwiftUI, all views conform to the View protocol. View represents a part of your user interface. It requires a single property: body, which returns another View. This allows you to create lightweight views that you can build on top of each other.

HStack {
    Text(person.name)
    Text(person.age)
}
See forum comments
Download course materials from Github
Previous: Introduction Next: Demo 1