if (answerText.text == @"1") { NSLog(@"YES"); } else NSLog(@"NO");
Solved! Go to Solution.
Hi guys,i have next code, where answerText is UITextFieldif (answerText.text == @"1") { NSLog(@"YES"); } else NSLog(@"NO");
this code always returns NO when i type in textField "1" (in iOS Simulator),it returns YES only when i type in Xcode answerText.text = @"1",why?
if ([answerText.text isEqualToString:@"1"]) { NSLog(@"YES"); } else NSLog(@"NO");
Hi guys,i have next code, where answerText is UITextFieldif (answerText.text == @"1") { NSLog(@"YES"); } else NSLog(@"NO");
this code always returns NO when i type in textField "1" (in iOS Simulator),it returns YES only when i type in Xcode answerText.text = @"1",why?
if ([answerText.text isEqualToString:@"1"]) { NSLog(@"YES"); } else NSLog(@"NO");