在 Storyboard 中实现 TableView 的活动指示器
我有一个实现文件,它从互联网上的 rss 加载数据,解析 xml 并填充我的 TableView 的行。我想在 TableView 上方显示一个活动指示器,直到填充整个表。
我的问题是,使用故事板时,我无法将活动指示器放在表格视图上方,而只能放在单个单元格上方。但在这种情况下,如果我编译,我会获得很多旋转器,每个单元一个。 关于如何在我的表格视图中仅显示一个旋转器有什么想法吗?
提前致谢, 亚萨
I have an implementation file that load data from rss in the internet, parse the xml and populates rows of my TableView. I would like to show an activity indicator above my TableView till the entire table is populated.
My problem is that with Storyboard I cannot put the activity indicator above the table view, but only above a single cell. But in this case, if I compile, I obtain a lot of spinners, one per cell.
Any ideas on how to show only one spinner centered in my table view?
Thanks in advance,
yassa
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,我找到了解决方案:使用故事板使用 ViewController (而不是 TableViewController)并放在 TableView 和活动指示器上方,如下所示:
我不知道这是否是最好的方法,但它对我有用!
Ok, I've found the solution: with storyboard use a ViewController (instead of a TableViewController) and put above a TableView and also an Activity Indicator, as follows:
I don't know if it's the best approach, but it worked for me!!!
看看 https://github.com/jdg/MBProgressHUD:
使用该实现,您可能会获得开箱即用的所需效果。
Have a look at https://github.com/jdg/MBProgressHUD:
Using that implementation you might get your desired effect out-of-the-box.