I'm writing a quiz type app and I've seen some on itunes where you need to type out what the logo is, and it seems to check each letter the user types and gives a tick or a cross depending on whether you typed the name correctly.
For example, I've seen quiz app where you need to guess logos of famous brands, but instead of multiple choice you get its brand name blanked out by crosses and as you type it changes the cross to a tick (assuming you got it right).
My question is, how do you do letter-by-letter validation? I'm thinking that regular expressions might help but I've only ever used it to enforce string input t be text.
Other than that the only thing I can think of is to explode the string of the answer into an array and checking your input against it, but I think this sounds way too slow.
I guess you could cycle through each letter typed, but if there is an easier solution to do letter-by-letter validation for an iphone quiz app that'd be great.
Thanks
char inputLetter = ...
if([answer characterAtIndex:i] == inputLetter)
{
//Yay!
}
What is slow about that?