Skip to content

Instantly share code, notes, and snippets.

@barrettj
Created August 20, 2012 12:45
Show Gist options
  • Save barrettj/3403776 to your computer and use it in GitHub Desktop.
Save barrettj/3403776 to your computer and use it in GitHub Desktop.
Nested BlockAlerts
BlockAlertView *alert = [BlockAlertView alertWithTitle:NSLocalizedString(@"FEEDBACK_PROBLEM_TITLE", nil) message:NSLocalizedString(@"FEEDBACK_PROBLEM_MESSAGE", nil)];
[alert setCancelButtonWithTitle:NSLocalizedString(@"Dismiss", nil) block:nil];
[alert addButtonWithTitle:NSLocalizedString(@"VIEW_HELP_BUTTON_TEXT", nil) block:^{
BlockAlertView *helpAlert = [BlockAlertView alertWithTitle:NSLocalizedString(@"HELP_TITLE", nil) message:NSLocalizedString(@"GOTALK_NOW_HELP_MESSAGE", nil)];
[helpAlert setCancelButtonWithTitle:@"Dismiss" block:nil];
[helpAlert addButtonWithTitle:NSLocalizedString(@"VIEW_OVERVIEW_BUTTON_TEXT", nil) block:^{
[self showOverview];
}];
[helpAlert addButtonWithTitle:NSLocalizedString(@"VIEW_USERS_GUIDE_BUTTON_TEXT", nil) block:^{
[self showUsersGuide];
}];
[helpAlert show];
}];
[alert addButtonWithTitle:NSLocalizedString(@"EMAIL_SUPPORT_BUTTON", nil) block:^{
[self sendFeedbackEmail];
}];
[alert show];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment