Skip to content

Instantly share code, notes, and snippets.

@keicoder
Created February 21, 2014 07:08
Show Gist options
  • Select an option

  • Save keicoder/9130042 to your computer and use it in GitHub Desktop.

Select an option

Save keicoder/9130042 to your computer and use it in GitHub Desktop.
objective-c : table view accessory-tapped delegate method
//table view accessory-tapped delegate method
#pragma mark - Accessory-tapped 델리게이트 메소드
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
if (debug==1) {NSLog(@"Running %@ '%@'", self.class, NSStringFromSelector(_cmd));}
UINavigationController *navigationController = [self.storyboard instantiateViewControllerWithIdentifier:@"ListNavigationController"];
ListDetailViewController *controller = (ListDetailViewController *)navigationController.topViewController;
controller.delegate = self;
Checklist *checklist = [self.dataModel.lists objectAtIndex:indexPath.row];
controller.checklistToEdit = checklist;
[self presentViewController:navigationController animated:YES completion:nil];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment