Adding items to an order with @EnvironmentObject - SwiftUI Starter Project 7/14

preview_player
Показать описание
In this video we look at how @EnvironmentObject lets us share data across different views in our app, then add a button to let users order some food.

This project is aimed at programmers who have some experience with Swift and UIKit already, and want to get up to speed with SwiftUI as quickly as possible.
Рекомендации по теме
Комментарии
Автор

I wish in this project you explained how to pop the itemDetail view back to the menuView when Add to Order is pressed... I can't work it out...

ZoeSummersA
Автор

for me... It does not create the object Order(). I've copied it exactly and steeped through with the complier. It just steeps right over it. can't understand why it will not create it

anthonybeaulieu
Автор

I keep getting the Error - Cannot convert value of type 'Binding<String?>' to expected argument type 'Binding<String>' when I try to display my EnvironmentObject? Any typical reasons why that would happen?

jwells