In my program, my alert only shows once then when called again, does not show.
The button still cancels touch as if to show the alert, but then no alert shows.
It would be great if an answer could be found, here is my code:
for (int x = 1; x <= 9; x ++) {
if ([[defaults objectForKey:[NSString stringWithFormat:@"fav%i",x]] isEqualToString:resultButton.currentTitle] || [[defaults objectForKey:[NSString stringWithFormat:@"fav%i",x]] isEqualToString:[NSString stringWithFormat:@"%@ Converter", resultButton.currentTitle]]) {
UIAlertView *alertThere = [[UIAlertView alloc] initWithTitle:resultButton.currentTitle message:@"Is currently in Favorites." delegate:self cancelButtonTitle:@"Okay" otherButtonTitles:nil, nil];
[alertThere show];
[alertThere release];
return;
}
}
Thanks!
The solution I found:
It was under a UIGestureRecognizer (Did not have anything to do with the loop).There are multiple methods for the subclasses that it calls. (Or something along those lines.)
Basically use a if{} statement to only allow one of those events through.
See here for more detail under the Methods For Subclasses.