Skip to content

Instantly share code, notes, and snippets.

@romyilano
Last active August 29, 2015 14:05
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 romyilano/86220d2845a662ded35d to your computer and use it in GitHub Desktop.
Save romyilano/86220d2845a662ded35d to your computer and use it in GitHub Desktop.
xcode storyboard... casting acrobatics.
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
UIViewController *nextController = [segue destinationViewController];
if ([nextController isKindOfClass:[NewRunViewController class]]) {
// aha!
((NewRunViewController *)nextController).managedObjectContext = self.managedObjectContext;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment