UITableView cellforrowatindexpath not called

后端 未结 12 763
梦谈多话
梦谈多话 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:58

    Old question, but I'll chime in. For others.

    There are a number of reasons why a tableview doesn't update and that cellForRowAtIndexPath: doesn't get called.

    If you're using a UITableViewController directly then it amy be that the "numberOfRowsInSection:" method is returning 0

    If you're using a UItableView in your view controller. chances are you haven't adopted the correct protocols and implemented the right methods - plus if you're using a xib or storyboard that you haven't assigned the right delegate and datasource is the other potential problem.

    Finally if you're using a subclass of UITableViewController then it's possible that you haven't overwritten one of the default methods and again numberOfRowsInSection is returning 0.

提交回复
热议问题