Skip to content

Instantly share code, notes, and snippets.

@rcdilorenzo
Created July 26, 2012 02:18
Show Gist options
  • Select an option

  • Save rcdilorenzo/3179889 to your computer and use it in GitHub Desktop.

Select an option

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