Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)showGameOverDialog {
- UIAlertView *alertView =
- [[UIAlertView alloc] initWithTitle:@"No words left"
- message:@""
- delegate:self
- cancelButtonTitle:@"New game"
- otherButtonTitles:@"Previous game info",
- @"Report bug",
- NULL];
- [alertView setTag:TAG_GAME_OVER];
- [alertView show];
- [alertView release];
- }
- - (void)alertView:(UIAlertView *)alertView
- clickedButtonAtIndex:(NSInteger)buttonIndex {
- NSString *buttonTitle = [alertView buttonTitleAtIndex:buttonIndex];
- NSInteger tag = [alertView tag];
- if (tag == TAG_GAME_OVER) {
- if (buttonIndex == [alertView cancelButtonIndex]) {
- [self newGame];
- } else if ([buttonTitle isEqualToString:@"Previous game info"]) {
- [self previousGameInfo];
- } else if ([buttonTitle isEqualToString:@"Report bug"]) {
- [self reportBug];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement