Skip to content

Instantly share code, notes, and snippets.

@patzearfoss
Created September 5, 2014 15:06
Show Gist options
  • Save patzearfoss/e1082c8ad7ac64c57dcf to your computer and use it in GitHub Desktop.
Save patzearfoss/e1082c8ad7ac64c57dcf to your computer and use it in GitHub Desktop.
- (void)typeButtonTap:(id)sender
{
UITableViewCell *cell = (UITableViewCell *)sender;
NSIndexPath *path = [self.tableView indexPathForCell:cell];
ESCContactEditViewModelBase *viewModel = [self viewModelForIndexPath:path];
[self displayTypeSelectorForViewModel:viewModel];
}
- (void)displayTypeSelectorForViewModel:(ESCContactEditViewModelBase *)viewModel
{
[self performSegueWithIdentifier:@"presentTypeSelector" sender:self];
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"presentTypeSelector"])
{
UINavigationController *navController = [segue destinationViewController];
ESCTypeSelectorViewController *typeSelector = [navController.viewControllers firstObject];
// WHY DO YOU HATE ME STORYBOARDS?
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment