Domanda

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

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top