if (answerText.text == @1) { NSLog(@YES); } else NSLog(@NO);
Hi guys,i have next code, where answerText is UITextField if (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);
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.