prepareForSegue not called when UITableView row selected?

后端 未结 2 617
一整个雨季
一整个雨季 2021-01-11 11:27

I have setup a UITableView using a NSFetchedResultsController that displays a number of prototype UITableViewCells. I have hooked up a push segue from my UITableViewCell to

2条回答
  •  清酒与你
    2021-01-11 11:47

    After a bit of digging I eventually found that the UITableViewCell identifier was set incorrectly to "CELL_ID" when it should have been "PLANTCELL_ID".

    Som for anyone else who finds that selecting a UITableViewCell in a UITableView does not call the associated segue, check if your cell identifier is set correctly in both the storyboard and tableView:cellForRowAtIndexPath:.

提交回复
热议问题