UITableView cellforrowatindexpath not called

后端 未结 12 895
梦谈多话
梦谈多话 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条回答
  •  猫巷女王i
    2021-01-05 08:14

    I'm not positive but here are some ideas.

    • I think when you put that array code in viewDidLoad it's too late. ViewDidLoad is executed after the data has already been placed in the table. Try putting this code in the initWithStyle method or whatever init method you have. Or you could even put it int the ViewWillAppear method, but then make sure to follow this next suggestion.
    • The other thing you could try is, just call [self.tableView reloadData] at the end of the viewDidLoad method. Although that's not as ideal as the first suggestion.

提交回复
热议问题