Swift UITableView didSelectRowAtIndexPath not getting called

前端 未结 10 2131
野的像风
野的像风 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-07 00:07

    Everybody is mentioning to set dataSource and delegate of the tableView. But after setting also not working fine then sometimes it may happen because of none or disable selection of table view.

    To enable it Go to storyboard -> Select tableView -> click on the attribute inspector ->go to selector -> Select selection as single selection (or multiple selection according to the requirements.)

    Please find attached screenshot for your suitability.

提交回复
热议问题