|
Hello, I'm on Day 37 of the course and the amount is not saving to the main ContentView screen. It just shows up as $0.00. I copy-pasted the code from the github, but it still doesn't work. I'm on Xcode 15.0, the latest version. Here is my code: ContentView:
AddView:
ExpenseItem:
Expenses:
It might be a bug in the latest version of Swift as of now. Help would be appreciated! |
|
|
|
|
|
Try to re-create project from scratch. I have just copied your code and it works just fine. XCode is 15.0 |
|
Keep an eye out for any updates or patches released by Apple. It's possible that this issue might be resolved in a future update. |
|
Turns out I just had to replace the "USD" currency code with the following:
Thanks for the help! |
SPONSORED Alex is the iOS & Mac developer’s ultimate AI assistant. It integrates with Xcode, offering a best-in-class Swift coding agent. Generate modern SwiftUI from images. Fast-apply suggestions from Claude 3.5 Sonnet, o3-mini, and DeepSeek R1. Autofix Swift 6 errors and warnings. And so much more. Start your 7-day free trial today!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.