Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

storyboard segue from a tablecell an its Detail Disclosure Button

I want to segue from a tablecell to two different viewcontrollers if clicked in the cell or clicked on the cells Detail Disclosure Button.

If I ctrl-drag the second segue, the first is deleted. What am I doing wrong?

Tnx Mica

like image 744
mica Avatar asked Dec 04 '22 05:12

mica


1 Answers

I don't think you can link a specific detail disclosure button w/ a segue. My storyboards are extremely programatic b/c I use alot of custom CGRect etc..

so I tend to use something like this:

-(void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
    [self performSegueWithIdentifier:@"ViewControllerIdentifer" sender:self];
}

for reference this is an extremely good example project on storyboards and tableviews. there's a link to the project at the bottom also.

http://www.raywenderlich.com/5191/beginning-storyboards-in-ios-5-part-2

like image 195
DJPlayer Avatar answered Dec 27 '22 21:12

DJPlayer