Skip to content

Instantly share code, notes, and snippets.

@Critter
Created June 29, 2013 03:32
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 Critter/5889596 to your computer and use it in GitHub Desktop.
Save Critter/5889596 to your computer and use it in GitHub Desktop.
passing an object using a seque
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
// Make sure your segue name in storyboard is the same as this line
if ([[segue identifier] isEqualToString:@"YOUR_SEGUE_NAME_HERE"])
{
// Get reference to the destination view controller
YourViewController *vc = [segue destinationViewController];
// Pass any objects to the view controller here, like...
[vc setMyObjectHere:object];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment