storyboard来自tablecell的详细信息披露按钮 [英] storyboard segue from a tablecell an its Detail Disclosure Button
问题描述
如果在单元格中单击或单击单元格详细信息披露按钮,我想从一个tablecell切换到两个不同的viewcontrollers
。
I want to segue from a tablecell to two different viewcontrollers if clicked in the cell or clicked on the cells Detail Disclosure Button.
如果我按下-drag第二个segue,第一个被删除。
我做错了什么?
If I ctrl-drag the second segue, the first is deleted. What am I doing wrong?
Tnx
云母
Tnx Mica
推荐答案
我认为您不能链接具有segue的特定详细信息披露按钮。我的故事板是非常编程的b / c我使用了很多自定义CGRect等。
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];
}
作为参考,这是关于故事板和tableviews的一个非常好的示例项目。还有一个指向底部项目的链接。
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
这篇关于storyboard来自tablecell的详细信息披露按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!