didSelectRowAtIndexPath: not being called

前端 未结 14 2225
轻奢々
轻奢々 2020-11-29 18:57

I have a UITableView as a subview of my UIScrollVIew, which is the main view controlled by my MainViewController.

In MainView

14条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 19:02

    Have you defined instance variable for tableview with same name. If not then might be this can be the issue-

    _myTableView.delegate = self;
    _myTableView.datasource = self;
    

    Or-

    self.myTableView.delegate = self;
    self.myTableView.datasource = self;
    

提交回复
热议问题