SwiftUI Tutorial: Build an ordering app with Forms, Pickers, and URLSession

preview_player
Показать описание
Ready to get started with SwiftUI? In this tutorial you'll learn how to build an app that lets users order cupcakes for delivery, all using SwiftUI's Form system, backed up by pickers, steppers, textfields, and URLSession for networking.

Рекомендации по теме
Комментарии
Автор

Questions? Comments? Tweet me @twostraws.

twostraws
Автор

I'm amazed by your productivity and the level of quality you put into your tutorials. Thank you for this video!

danielsaidi
Автор

I clicked this video thinking it was going to be a half-assed video spread out across 3-4 videos. But no! Wow this was really well though out. You built it step by step and provided actual real world example of use. And used native libraries all the way without being carried away with the options. A concise and informative video with an accurate end result in the time of the video length! ☺️

/subscribed

DanijelJames
Автор

All the topics in this project are 100% required in every iOS job interview requirement I have seen locally, and there is so little good, complete and comprehensive material on URLSession and Codable. It was a real plus to see this in SwiftUI! I hope to see much more material on these topics! I will pay $$$ for good material!

rgenericson
Автор

Guys! You should add @Published before "var" to accept any user's changes in the View

kostiantynnevinchanyi
Автор

Hands down one of the most approachable learning videos for Swift UI. Great work! Keep them coming!!!

joeyhasty
Автор

Overall, I’d say this is one of the best tutorials out there. Rather than just messing around with stupid math problems or other pointless things to illustrate how coding works, you’re showing a real world example of an app and we can see what is happening in real time. This is exactly what I’m ALWAYS looking for, and you do a great job at explaining things clearly and simply.

That being said, might I offer a little a little/feedback/suggestion from my personal point of view as a complete beginner?

When learning something new, in the beginning stages, my brain craves a semi rigid foundation of concrete ideas.

I need some kind of a blueprint/template to be able to memorize and make sense of how different parts of a system work together and interact with each other.

That means that I generally don’t do well with an instructor who teaches in a conversational style where they pepper the instruction with the live streams of thought that veer from learning these rigid associations—initially at least.


For example, people who teach coding often have this habit of showing how you do something, while also saying “But you could also do it this way” or “However, if you wanted this, then you’d have to do *blank* instead.”

Stuff like that. Stuff like this only confuses me and makes me uncertain which piece of information is the most important to absorb in that moment.

So my approach to teaching would be to start with the most used standard practices in MOST situations, and then once the students have a solid foundation, then you can start riffing and philosophizing and exploring the different ways one can do something.

I don’t mean to sound condescending but I think because it’s such second nature to think this way, many coders forget what it’s like to not know these things or how to think in this way, and they don’t realize that they need to slow it down any further.

I’m talking about teaching coding as if you’re teaching a toddler.

kconrad
Автор

I was hoping for an app to order avocado toast, I suppose cupcakes will do.

P. S.
Great video!

MikaelaCaron
Автор

There is a little change tot bindableobject and @ObjectBinding.
They can't be used any more.

Instead of that this is the new one:
BindableObject -->> ObservableObject
And:

And extra to the variables:
var quantity = 3 { didSet { update() }} -->>
@Published var quantity = 3 { didSet { update() }}

@Published has to be added

Hope you don't mind me posting here :)

erichsnijder
Автор

In a production app, how is the keyboard handled? Does the form slide up when the keyboard is enabled and how is the dismissal triggered? Also can you specify a specific keyboard or does the form automatically recognize which one the text field needs? Thanks. Learning so much from these videos.

mevanslondon
Автор

Could you please update this great example now that BindableObject is deprecated in SwiftUI ?

JN-wjtj
Автор

You are the best.
The tut is very clear and an pleasure to listen to.

Thank you very much

erichsnijder
Автор

Can you tell us where does the data go once sent by the user … how can we send the submitted form data to an email I’d .. or is this just a tutorial with no ending

QDWorld-Apps
Автор

Can you please add the ability to Tab from one textfield to another textfield when filling out the form?

pickemparty
Автор

@Paul have you made a follow-up to this video with more recent versions of Swift and SwiftUI?

DavidNitzscheBell
Автор

Another fantastic SwiftUI example app, great stuff!

Especially liked the tip about disabling the button based on the isValid computed property, as well as the reqres site for testing URLSession and JSON decoding.

brianbkcodes
Автор

Doode! That was badass! SwiftUI preview choked on launch of Cupcake Corner, lol! That was a truckload of material! Good thing the sim was working!

rgenericson
Автор

I'd like to know how to validate text in Form, i.e limit text up to 8 characters, don't allow any special characters, etc. Please include these validations in your upcoming tutorials. Thanks

dhavalnena
Автор

Fantastically helpful video as usual Paul, thank you. I was just wondering, around 9:30, when creating the stepper to hold the number of cupcakes, why the first "order.quantity" has the $ in front of it but the string interpolation doesn't?

JacksMacintosh
Автор

Paul, You're awesome man! Keep doing your great work, Thank you!

dhavalnena