Skip to content

Instantly share code, notes, and snippets.

@keicoder
Last active January 1, 2016 06:59
Show Gist options
  • Save keicoder/8108437 to your computer and use it in GitHub Desktop.
Save keicoder/8108437 to your computer and use it in GitHub Desktop.
objective-c : UITableView Cell의 Detail Disclosure 버튼에 Segue 적용
UITableView Cell의 Detail Disclosure 버튼에 Segue 적용 (for iOS 5)
//Note: As of Xcode 4.5 and iOS 6 you can now make segues directly from accessory buttons.
//When you Ctrl-drag from the table view cell,
//Xcode asks you whether you want to put the segue on the whole cell or just the accessory button.
//this new feature is not compatible with iOS 5
//first :
//table view cell in the Storyboard editor and in the Attributes Inspector set its Accessory to Detail Disclosure.
//Ctrl-drag from the ChecklistsViewController icon in the dock area to the Navigation Controller and make a Modal segue:
//set segue identifier “ex. EditItem”
- (void)tableView:(UITableView *)tableView ê accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
[self performSegueWithIdentifier:@"EditItem" sender:nil];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment