Iam calling this Code in my ViewController if some Settings are not set or are (by the length) zero:
UIAlertView *infoView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Achtung", nil) message:NSLocalizedString(@"Wrong Settings",nil)delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[infoView show];
[infoView release];
The Alertview shows up and if I press the Home Button and start the App again it shows the Alert zwice, after that if i press the Home Button again an开发者_如何学运维d start the App the Alert shows up 4 times.....
Why the hell is it like this?
I tried to define a new function for it and tried many other workarounds but nothing worked out for me.
Somebody any Suggestions?
Something like this
- (void)viewWillDisappear {
[super viewWillDisappear];
[myAlert dismissWithClickedButtonIndex:0 animated:NO];
}
精彩评论