Skip to content

Commit

Permalink
Display modal when emulation exits
Browse files Browse the repository at this point in the history
  • Loading branch information
tbodt committed Nov 8, 2017
1 parent a2e6150 commit 42cacc1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/TerminalViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,15 @@ - (void)keyboardDidSomething:(NSNotification *)notification {
}

- (void)ishExited:(NSNotification *)notification {
NSLog(@"exit");
[self performSelectorOnMainThread:@selector(displayExitThing) withObject:nil waitUntilDone:YES];
}

- (void)displayExitThing {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"attempted to kill init" message:nil preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"goodbye" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
exit(0);
}]];
[self presentViewController:alert animated:YES completion:nil];
}

@end

0 comments on commit 42cacc1

Please sign in to comment.