My thought processes while troubleshooting a @State variable and an onTapGesture property:

how do we handle this?!
hmm
*tries the $binding thing*
how did I do this last time??
here!
uggghhh
*turns on the explosive ipad*
*turns off the explosive ipad*
A ROT CYST
ooh!
it changed color!
you know you're doing something right when the text changes color
it still doesn't respond to my prodding
none of these breakpoints are doing anything!
WHAT?!
IT WAS THE COLOR?!?!?!
h,,,

In the end, the reason for the dysfunctional variable was the fact that I had put its declaration in the content declaration instead of the view function declaration. And the dysfunctional tap events were caused by a coexisting .foregroundColor(Color.clear) modifier . . . for some strange reason.

comments