Understanding imperative and declarative programming
SwiftUI is a fairly new framework introduced by Apple in 2019 that includes intuitive new design tools that help make building great-looking interfaces almost as easy as dragging and dropping… almost. With its modular approach, it’s estimated that you can build the same projects previously built in Xcode using about five times less code. Also, SwiftUI was Apple’s solution for building apps that can easily be used on all of their other platforms – so, an app can be built once, and it will perform perfectly on iOS, tvOS, macOS, and watchOS.
The SwiftUI interface, which we will cover shortly, uses editor and canvas preview windows that work in tandem. As you code in the Xcode editor, the new design canvas displays everything completely in sync and renders in real time as you type. So, any change you make in the editor is immediately reflected in the canvas preview, and vice versa.
I mentioned the ease...