Book Image

SwiftUI Projects

By : Craig Clayton
Book Image

SwiftUI Projects

By: Craig Clayton

Overview of this book

Released by Apple during WWDC 2019, SwiftUI provides an innovative and exceptionally simple way to build user interfaces for all Apple platforms with the power of Swift. This practical guide involves six real-world projects built from scratch, with two projects each for iPhone, iPad, and watchOS, built using Swift programming and Xcode. Starting with the basics of SwiftUI, you’ll gradually delve into building these projects. You’ll learn the fundamental concepts of SwiftUI by working with views, layouts, and dynamic types. This SwiftUI book will also help you get hands-on with declarative programming for building apps that can run on multiple platforms. Throughout the book, you’ll work on a chart app (watchOS), NBA draft app (watchOS), financial app (iPhone), Tesla form app (iPhone), sports news app (iPad), and shoe point-of-sale system (iPad), which will enable you to understand the core elements of a SwiftUI project. By the end of the book, you’ll have built fully functional projects for multiple platforms and gained the knowledge required to become a professional SwiftUI developer.
Table of Contents (13 chapters)

Chapter 5: Car Order Form – Data

When Apple first announced SwiftUI, I spent the week working on designs. What was fascinating to me was having so much more flexibility to do what we want and the simplicity it took to do it. The iOS navigational hierarchy is pretty rigid, which makes it not tricky but quite troublesome to use. One thing I didn't expect to enjoy learning was State and Binding, along with Combine.

In my job, we use reactive programming, and honestly, I am not a fan. The learning curve is steep, but I feel people force certain reactive programming parts because they think reactive programming is cool. I enjoy taking a simple button and making it so that you do not have to create a delegate and all that comes with it. From that standpoint, I enjoy it, but I feel that the SwiftBond library, which is now Bond, does a great job of making it super simple to use.

I feel Apple has done the same thing with using State and Binding, and the more I work with...