首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

#segue

如何在选择UITableViewCell时进行推送?

这是另一个选项,它不需要使用didSelectRowAtIndexPath。 你只需将Interface Builder中的segue从原型单元连接到目标。 代码: override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if segue.identifier == "AffiliationDetail", let destination = segue.destinationViewController as? AffiliateDetailViewController { if let cell = sender as? UITableViewCell, let indexPath = tableView.indexPathForCell(cell) { var affiliation = affiliations[indexPath.row] destination.affiliation = affiliation } } } ... 展开详请
领券