Skip to main content

Wrap up: our SwiftUI project is complete

About 2 minSwiftSwiftUIArticle(s)bloghackingwithswift.comcrashcourseswiftswiftuixcodeappstore

Wrap up: our SwiftUI project is complete 관련

SwiftUI by Example

Back to Home

Wrap up: our SwiftUI project is complete | SwiftUI by Example

Wrap up: our SwiftUI project is complete

Updated for Xcode 15

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. But even though we've only built a simple app, I hope you can appreciate how powerful SwiftUI is, and how it makes it easy to build real-world projects quickly.

If you've enjoyed this brief exposure to SwiftUI and want to learn more, I have a massive, free course to teach you all about it called the 100 Days of SwiftUI. You can find that hereopen in new window

And if you'd like to see my completed version of this project, you can find it here on GitHub: twostraws/iDineopen in new window.


Challenges

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.

Similar solutions…
SwiftUI tutorial: Building a complete project | SwiftUI by Example

SwiftUI tutorial: Building a complete project
How to wrap a custom UIView for SwiftUI | SwiftUI by Example

How to wrap a custom UIView for SwiftUI
Two-way bindings in SwiftUI | SwiftUI by Example

Two-way bindings in SwiftUI
How to use Instruments to profile your SwiftUI code and identify slow layouts | SwiftUI by Example

How to use Instruments to profile your SwiftUI code and identify slow layouts
SwiftUI tips and tricks | SwiftUI by Example

SwiftUI tips and tricks