if (menuPlayed == TRUE && [sender tag == 0]) {
NSLog(@"You're pressing the right button at the right time");
}
Any idea why this is throwing up a “Expected “]
“” error? I have absolutely no idea what’s wrong with those comparisons 🙁
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Change your code to:
And you’ll probably have to typecast sender, something like
Ofcourse you shouldn’t just use (UIButton *) for typecast.
Use the correct class of your sender object or use one
of it’s ancestor classes. I believe ‘tag’ is added to
UIView in this object hierarchy.