Here, a AlertView will be shown if user click NO in the Action Sheet, to prompt user that the application is kept running.
- (void)actionSheet:(UIActionSheet *)actionSheet
didDismissWithButtonIndex:(NSInteger)buttonIndex
{
if (buttonIndex == [actionSheet destructiveButtonIndex])
{
exit(0);
}
else
{
UIAlertView *alert =[[UIAlertView alloc]
initWithTitle:@"No Exit"
message:@"Application keep running"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
}
}
