Having something really strange happen, and I don't understand how it's even possible. I'm new to swift, so I may be missing something. I can post more code if needed, but regardless of what else I'm doing, how could this ever happen?
if sender.on {
txtNumMavericks.hidden = false
} else {
txtNumMavericks.hidden = true
}
In this case, the sender is a switch. When the switch is false, just the second part of the block runs, as expected. But when it is true, it executes both the top and bottom statements (makes txtNumMavericks appear and then immediately disappear). I found this by putting a breakpoint above the if statement single stepping through the code with F6.
Aucun commentaire:
Enregistrer un commentaire