应用程序启动时的 UIActivityIndicator
我已经搜索过,但没有找到我想要的东西。我有一个 UITabBar 应用程序,在第一个视图中,它从网络加载大量数据。这可能需要几秒钟的时间,尤其是在连接到边缘网络时。
我有一个显示徽标等的启动屏幕,但我想添加一个活动指示器以向用户显示实际正在发生的事情。
我怎样才能实现这个目标?我发现的帖子只在选项卡之间切换时考虑 ActivityIndicators。
谢谢
I have searched but not found exactly what I was looking for. I have a UITabBar application that, in the first view, loads a large set of data from the web. This might take several seconds, especially when connected to an Edge network.
I have a startup screen showing a logo etc., but I would like to add an activity indicator to show the user that something is actually going on.
How can I achieve this? The posts I have found do only regard ActivityIndicators while switching between tabs.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果加载数据需要很长时间,您可以使用另一个视图控制器作为 rootViewController,只需具有启动屏幕(具有在下载数据之前可以显示的图像或视图的屏幕)和活动指示器,当您下载完成时,删除temprootViewcontroller 从窗口并将原始控制器添加到窗口。
编辑
If the loading of data takes much time you can take another view controller as your rootViewController just having the Splashscreen (The screen having the image or view that you can display till the data is being downloaded) and activity indicator and when your download completes remove the temprootViewcontroller from the window and add your original controller to the window.
Edit