UITableView cellforrowatindexpath not called

后端 未结 12 770
梦谈多话
梦谈多话 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 07:53

    I've encounter some similar problem there. The table view delegate and data source is set properly, and (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section also returns a positive count. But - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath is never called.

    I've tried the methods before, but It doesn't work neither. Finally, I've noticed that I've forgotten to add the table view as a subview of my view controller. After doing that, it works like a charm.

提交回复
热议问题