I have a function that displays "correct" when the user puts in the right answer.
This is how I call it:
The text is not showing up. How can I fix this?
Code Block Swift func displayCorrectOrIncorrect() -> some View { Group { if correctAnswer == quiz.answer { VStack { Text("Correct") } } else { VStack { Text("Incorrect, correct answer is \(correctAnswer)") } } } }
This is how I call it:
Code Block SwiftUI Button(action: { self.displayCorrectOrIncorrect() self.updateUI() })
The text is not showing up. How can I fix this?