每10分钟我将我的应用与服务器同步,当服务器出现问题时,我会显示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];
如果要击落服务器并且不接触电话,小时会有6个警报对话框,我应该关闭6个AlertDialogs。如何解决? AlertView可以检查它是否已经向用户显示或类似的东西?感谢...