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

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top