2016-06-09 41 views

回答

0

简单,在你的UITableViewDelegate

func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { 
    self.performSegueWithIdentifier("SegueCellTap", sender: self) 
} 

func tableView(tableView: UITableView, accessoryButtonTappedForRowWithIndexPath indexPath: NSIndexPath) { 
    self.performSegueWithIdentifier("SegueAccessoryButtonTap", sender: self) 
} 
+0

我已经这样做了,但是当我点击显示指示灯时,它会延伸到相同的viewController – flunk

+0

我有一个单元或配件上的一个水龙头的两个segue – flunk

+0

顺便说一句,谢谢我做了这两个故事板和tableviewDelegate这就是为什么我有两次赛格,我演了两次,表明我除了在代码中的故事板上工作得很好,如果我会这样做,我不应该在故事板上继续延续我猜 – flunk

0

如果要创建一个故事板的一切,你可以简单地从细胞拖(确保电池在大纲中选择)到目标视图控制器,并为附件执行相同操作。

+0

非常感谢你解决了这个问题 – flunk