Group Group Group Group Group Group Group Group Group

Your First iOS & SwiftUI App: An App from Scratch, Episode 12: SwiftUI State | raywenderlich.com

Learn about an important concept called SwiftUI state, which helps you keep your user interface and app state always consistent.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/28797163-your-first-ios-swiftui-app-an-app-from-scratch/lessons/12

the copy code has more variables from down course, so i had to comment out with extreme prejudice

Hi Ray, Im not sure how to write the code with the updated description. When I replace your code with the one provided, i get the error “game is not in scope”. can i please get some help on this?

1 Like

I’m not sure what code to comment out. I try to comment out all the code that says game and I still get errors. I need help. Anyone knows how to properly code this? When i use Ray’s exact code in the video I get error and the .alert does not auto-complete like Ray’s code does. Please help.

I used the code as indicated in the video from Ray and it works/compiles fine without any warnings. The updated “Copy” code version appears to be from later in the course and raises errors as gjatt and morpheus77 have indicated.

@rwenderlich Would appreciate your help on this!