UITableView delegate and dataSource methods not getting called

后端 未结 8 1376
野性不改
野性不改 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 15:07

    I had a similar problem, my solution was because I did not set the number of sections to 1.

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
    {
        // Return the number of sections.
        return 1;
    }
    

提交回复
热议问题