【发布时间】:2015-08-25 03:27:48
【问题描述】:
我知道在用户选择一个单元格后如何将他们发送到一个新单元格,但是如果我的单元格的顺序发生变化,因为我正在从 Parse 检索数据,因此对于每个新单元格,行号都会发生变化。
当用户选择某个单元格时,如何确保将用户发送到正确的页面?这是我目前正在使用的,但我知道必须有比硬编码每个可能的选项更好的解决方案..
有什么建议吗?
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
if indexPath.section == 0 && indexPath.row == 1 {
self.performSegueWithIdentifier("toSettingsPage", sender: self)
}
}
【问题讨论】:
标签: ios swift uitableview parse-platform didselectrowatindexpath