Skip to content

Instantly share code, notes, and snippets.

@rogerluan
Created November 18, 2015 16:45
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 rogerluan/51ffcd9dd3d5dc5628ca to your computer and use it in GitHub Desktop.
Save rogerluan/51ffcd9dd3d5dc5628ca to your computer and use it in GitHub Desktop.
Code snippet for blog series.
#import "TableDelegate.h"
//adicionar antes do último @end
#pragma mark - IBActions -
- (IBAction)itemPressed:(TableDelegate*)sender {
TableData *data = sender.selectedData;
UIAlertController *alert = [UIAlertController alertControllerWithTitle:data.title message:
[NSString stringWithFormat:NSLocalizedString(@"Jogo na posição %d, com %d canais e %d visualizações.", nil),[data.position integerValue],[data.channels integerValue],[data.views integerValue]] preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil];
[alert addAction:cancelAction];
[self presentViewController:alert animated:YES completion:nil];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment