SwiftUI - Updating the UI

Updating the user interface in SwiftUI is rather simple with the newly introduced @State attribute which acts as a wrapper around a value. struct ContentView: View { @State private var...

SwiftUI - Communicating with the UI

Apple provides three means of communication with different scopes. @State @ObservableObject @EnvironmentObject The @State and @Environment attributes belong to the SwiftUI framework. The @ObservableObject attribute is part of the Combine...

SwiftUI - Building the UI

SwiftUI enables us to build the user interface in a declarative way. The framework is entirely designed around structs. — View hierarchy struct ContentView: View { var body: some View...

SwiftUI - Introduction

This next series of articles aims at describing the process of building an app using SwiftUI and Combine with a MVVM architecture. The following stories are based on my experience...

SwiftUI - @State

Introduced with SwiftUI, the @State attribute is key to view rendering. Because SwiftUI works closely with structs which are immutable types, whenever the body’s property is computed, the system must...