Formatting number strings in SwiftUI - SwiftUI Starter Project 11/14

preview_player
Показать описание
In this video we adjust the way our total string is shown in the app by adding an interpolation format specifier.

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 am following this tutorial but when I get to this section, as you outlined, I get 'Cannot find 'order' in scope' for the line with Double(order.total). I have tried to bring in the environementObject but that doesn't seem to help out. Is there something I have to do, in CheckoutView, to get it to recognize the EnvironmentObject? I am going to go back through the lessons to see if I missed something but everything ran fine until this piece. Any help would be appreciated.

ChadDunlap-jc