I'm trying to debug my iPhone app (a basic counter) and I have a "goto" function to go to a specific number. When testing my app, I noticed that when set the goto without putting anything into the NSTextField
, it doesn't return anything. Not a NULL
, nil
, or anything. NSLog
ging the input string doesn't even show up in console. No blank message, no NULL
message, nothing. If you want to see my code, here it is:
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
switch(buttonIndex) {
case 0:
break;
case 1:
NSLog(@"Method called");
NSLog(@"%@", [[alertView textField] text]);
if ([[alertView textField] text] != NULL) {
count = [[[alertView textField] text] intValue];
[label setText:[[alertView textField] text]];
} else {
break;
}
}
}
"Method called" always shows up, but the next line doesn't come up at all on a case with no input.
Thanks in advance!