Skip to content

Instantly share code, notes, and snippets.

@c1800054work
Created March 21, 2019 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c1800054work/8e09c6227273e13abe67b691e57d42f4 to your computer and use it in GitHub Desktop.
Save c1800054work/8e09c6227273e13abe67b691e57d42f4 to your computer and use it in GitHub Desktop.
- (void)onLogout {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"離開程式"
message:@"請確定是否離開程式"
delegate:self
cancelButtonTitle:@"取消"
otherButtonTitles:@"是的", nil];
alert.tag = 1;
[alert show];
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (alertView.tag == 1) {
if (buttonIndex == 1) {
// 按下“是的”後的行為
}
else{
}
}
else{
[self doParse];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment