How Do I Validate UITextField with Correct Answer String?
I have a UITextField that the user inputs their answer. If the answer is correct they are taken to another screen. I have compared the two strings in NSlog in the foundation.h file (as indicated in beginner tutorials) but as I am new I am getting lost when I have .m and .h files in xcode.
I have declared the NSString *answer = @"The Correct Answer";
and in the .m file put
if ([UITextfield1.text isEqualToString:@"The Correct Answer"])
then...
this is where I get lost (sorry total newbie) firstly, is what I am doing above correct and secondly, how do I then tell it to change screen when the answer is correct.
Any help will be greatly appreciated.
Thanks in Advance
|