Hi,
I’m not sure if it’s an errata in the book (p.91, chapter 1) or just myself that misunderstand something. It says that alert() requires two arguments, a binding, and an object.
The attached code is :
.alert(isPresented: self.$alertIsVisible) { Alert(title: Text("Hello there!"), message: Text("This is my first pop-up."), dismissButton: .default(Text("Awesome!"))) }
However, I see one argument within the parenthesis (the binding), and then in the mini program between braces is the object. Am I wrong ?
Also, how would you read the first line in natural language ?
“The method alert … ?”
Thanks for your help and highlights !