Objective C:如何向导航栏添加微调器
每当我尝试刷新页面时,我都会遇到锁定屏幕的问题。
如何在不锁定屏幕的情况下从服务器加载数据并向导航栏(如 Instagram)添加微调器?
I have an issue of locking my screen whenever I try to refresh my page.
How can I load data from the server and add a spinner to the navigation bar (like instagram) without locking my screen?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
要添加微调器,您可以执行类似
锁定怎么样?我不明白。
To add spinner you can do something like
What about locking? I didn't understand.
您可能需要查看这个开源项目来满足您的需求,这里有几个示例供您使用咨询。
You might want to look at this open source project for what you need, several examples are there for you to consult.
至于不阻塞 UI,请查看 中央调度。基础知识相当容易实现。具体来说,请查看
dispatch_async()
和dispatch_sync()
;As for not blocking the UI, have a look at Grand Central Dispatch. The basics are fairly easy to implement. Specifically, have a look at
dispatch_async()
anddispatch_sync()
;