I am new in the game, so probably an easy issue. What I am trying to do is to make an app with a question asked, and a textFiled in which to answer. Then, i want the app to recognize when the answer is right (in this case the number 25) and when it is wrong (not 25). Everything is working fine, and I get the “wrong” message, but I cant make it recognize the right answer.
- (IBAction)btnSubmitAction:(id)sender {
if (textFieldAnswer.text == @"25") {
lblAnswer.text = @"Yes, your right!";
btnNext.hidden = 0;
} else {
lblAnswer.text = @"No, try again.";
}
}
Thanks a lot!
Well, this is how you’re supposed to compare strings: