Swift UITableView didSelectRowAtIndexPath not getting called

前端 未结 10 2012
野的像风
野的像风 2021-02-06 23:18

New to IOS development and am having trouble with handling cell selection on a table. Whenever I select, the method is not getting called below - any idea why?

My proje

10条回答
  •  -上瘾入骨i
    2021-02-06 23:49

    Another caveat which took me ages to figure out is to make sure that all three of your Table View, your Cell and your Content View all have User Interaction Enabled. Then in Swift 4, at least, you can use:

    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)
    

提交回复
热议问题