didSelectRowAtIndexPath执行SegueWithIdentifier gose错误但didDeselectRowAtIndexPath是否正常?

时间:2016-03-03 11:41:33

标签: ios tableview segue

我有一个tableView,单元格已经转向详细的视图控制器。

当我使用 didSelectRowAtIndexPath 执行详细视图控制器时,我无法正确关闭视图控制器。

   func tableView(tableView: UITableView, **didSelectRowAtIndexPath indexPath**: NSIndexPath) {
    performSegueWithIdentifier("addressCell", sender: tableView)
}

使用后

 dismissViewControllerAnimated(true, completion: nil)

详细的观点没有被驳回并且有警告:

AddAddressViewController: 0x7f891b929d20> on 
<AccountAddress: 0x7f89195e3ba0> whose view is not in the window hierarchy!

但是当我使用 didDeselectRowAtIndexPath

func tableView(tableView: UITableView, **didDeselectRowAtIndexPath** indexPath: NSIndexPath) {
    performSegueWithIdentifier("addressCell", sender: tableView)
}

它运行正常但没有警告!

有什么问题?

enter image description here

enter image description here

0 个答案:

没有答案