0

Every 10 min I synchronize my app with server, and when something wrong with server, I show UIAlertView.

    NSString *alertTitle = @"Sync failed";
    NSString *alertMessage = @"Something wrong with server"

UIAlertView *alertView = [[UIAlertView alloc]
    initWithTitle:alertTitle
    message:alertMessage
    delegate:nil
    cancelButtonTitle:NSLocalizedString(@"OK", @"OK button title")
    otherButtonTitles:nil];
[alertView show];
[alertView release];

If to shoot down server and do not touch phone, in hour there will be 6 Alert Dialogs, and I supposed to close 6 AlertDialogs. How to fix that ? Can AlertView check if its already shown to user or something like that ? Thanks...

Jim
  • 8,324
  • 16
  • 64
  • 121
  • 5
    This has already been answered: http://stackoverflow.com/questions/2528929/iphone-sdk-check-if-a-uialertview-is-showing – Anton Jul 23 '11 at 14:10
  • 1
    Why not setting a flag as an instance variable of the object that shows the alertView? – Till Jul 23 '11 at 14:11
  • Sorry about that !! Anton, thanks for answer... – Jim Jul 23 '11 at 14:28

0 Answers0