UITableView delegate and dataSource methods not getting called

后端 未结 8 1386
野性不改
野性不改 2021-02-13 14:23

I have a UIView which contains a UITableView. The tableview\'s delegate is set to my UIView, but it never calls the delegate methods:

-(id)init {
    self = [sup         


        
8条回答
  •  被撕碎了的回忆
    2021-02-13 14:55

    You should declare your view like this @interface MyView : UIView

    BTW: I would have a ViewController that "controls" your view and your tableview, and have the ViewController be the delegate and datasource of the table view.

提交回复
热议问题