SALE ENDS TODAY: Save 50% on all Swift books and bundles! >>

Wrap up: our SwiftUI project is complete

Paul Hudson    @twostraws   

Fully updated for Xcode 11.2

I’m not going to claim this was an easy project, particularly because SwiftUI forces us to think in such a different way from UIKit. Not only do we have the declarative, reactive approach to logic, but we also have @State, environment objects, two-way bindings, and more to deal with – it’s a combination of powerful new Swift language features in tandem with a whole new UI framework.

In this project I’ve tried to expose you to a number of different things all at once, including lists, stacks, forms, navigation, alerts, and more. Even then there’s still a lot more to cover, but even at this early juncture it seems clear to me the goal isn’t to build all apps with SwiftUI: Apple is shipping only a subset of the functionality we need so it has time to bed in before they start adding more.

So, as great as SwiftUI was this year, you should expect to see even more out of WWDC20!

Challenge

One of the best ways to learn is to write your own code as often as possible, so here are three ways you should try your new knowledge to make sure you fully understand what’s going on:

  1. Customize the “Order This” button with a custom font, background, and more.
  2. Add “Pickup time” to CheckoutView, with the options “Now”, “Tonight”, and “Tomorrow Morning”.
  3. Add a Favorite navigation bar item to ItemDetail and a Favorites tab showing them all.

SPONSORED Instabug helps you identify and resolve severe crashes quickly. You can retrace in-app events and know exactly which line of code caused the crash along with environment details, network logs, repro steps, and the session profiler. Ask more questions or keep users up-to-date with in-app replies straight from your dashboard. Instabug takes data privacy seriously, so no one sees your data but you! See more detailed features comparison and try Instabug's crash reporting SDK for free.

Save 50% on all books and bundles

The biggest ever Hacking with Swift sale is now on, letting you save 50% on all books and bundles. Learn something new with Swift and enjoy great savings while the sale lasts!

Click here to save 50% in our Black Friday sale!

Similar solutions…

BUY OUR BOOKS
Buy Pro Swift Buy Swift Design Patterns Buy Testing Swift Buy Hacking with iOS Buy Swift Coding Challenges Buy Swift on Sundays Volume One Buy Server-Side Swift (Vapor Edition) Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Advanced iOS Volume Three Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with macOS Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Server-Side Swift (Kitura Edition) Buy Beyond Code

Was this page useful? Let us know!

Average rating: 5.0/5