how to compare textfield string with array string in iphone s开发者_开发问答dk? please help me?
NSMutableArray *array=[[NSMutableArray alloc] initWithObjects:@"Apple",@"Google",@"AJS"];
NSString *tempString=textField.text;
for(int i=0; i<=[array count]; i++)
{
if([tempString isEqualToString:[array objectAtIndex:i]])
{
NSLog("String is equal");
}
}
this one will help you.
精彩评论