UITableView cellforrowatindexpath not called

后端 未结 12 858
梦谈多话
梦谈多话 2021-01-05 07:24

I am pretty new to Iphone development . so please bear me if I ask some very simple questions.

In my application I have multiple views(i.e. .xib files). On clicking

12条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-05 08:10

    Well, I can add one simple point for everyone with this problem. I would recommend using debug and making sure that:

    -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
    

    does not return 0. If this function is not implemented or if it returns 0, the method:

    cellForRowAtIndexPath:(NSIndexPath *)indexPath 
    

    is not called at all since there are no cells to be displayed.

提交回复
热议问题