TableView 不显示数据? [英] TableView is not showing data?
问题描述
我之前已经将这个问题放在下面带有代码的链接上&截图.
I have place this question before on following link with code & screenshot.
现在我知道我的 tableview 正在 tableview 单元格中加载数据但没有显示/显示它.我的项目中有一个模型视图控制器.通过搜索按钮从 Mapviewcontroller 屏幕调用 ModelView 控制器.退出模型视图控制器后,我可以在 tableview 中看到数据.(这意味着当我移动到下一个控制器并返回到上一个 tableview 时.我的 tableview 显示其中的数据.)
Now I came to know my tableview is loading data in tableview cell but not showing/displaying it. I have one Model View Controller in my project. The ModelView controller get called from Mapviewcontroller screen through Search Button. After resigning the Model view controller I can see the data in tableview. (It means when I move to next controller and back to previous tableview.. my tableview shows data in it.)
在这里,我只有在退出模型视图控制器后才能在 tableview 中看到我的数据.....一切正常.我只想知道我应该如何在第一个屏幕上调用 web 服务时立即显示 tableview 数据???
Here I my data get visible in tableview only after resigning the modelview controller..... Everything works fine. I just want to know how should I display the tableview data as soon as web-service get called on first screen itself???
推荐答案
Put [_tableView reloadData];
在调用 web 服务的方法的末尾,或者填充 [_tableView reloadData];
代码>标记代码>数组.
Put [_tableView reloadData];
at the end of the method that calls the web-service, or the one that populates the markers
array.
这篇关于TableView 不显示数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!