|
Good day all! I have some questions about the 21st day Here is my code:
|
|
Maybe this will help As for the
works because the |
|
One more question :)
The rest of the code:
Because I still don't get it |
|
The In flagTapped
is the check for the good answer.
The |
|
I like to think of So look at this code as the instructions to a factory. And ask yourself, What kind of views is this factory going to make?
Next question to ask yourself.... How many buttons is this factory going to make?
This In iOS applications, buttons usually have a label and will perform some action when tapped by your user! So ask yourself these final two questions:
You can see from the code that the So as the When the player presses a flag button, it executes the |
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.