Skip to content

Instantly share code, notes, and snippets.

@rcdilorenzo
Created July 26, 2012 02:18
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 rcdilorenzo/3179889 to your computer and use it in GitHub Desktop.
Save rcdilorenzo/3179889 to your computer and use it in GitHub Desktop.
IBAction for presenting modal controller with custom setup
- (IBAction)startGame:(id)sender {
LDNViewController *ldnVC = [self.storyboard instantiateViewControllerWithIdentifier:@"gameController"];
if (playerNameField.text != @"" && playerNameField.text != nil) {
ldnVC.game = [[LDNGoFishGame alloc] init];
[ldnVC.game setupWithLivePlayer:playerNameField.text];
[self presentModalViewController:ldnVC animated:YES];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment