iPhone 4.0 - 后台计时器
似乎在后台创建的 NSTimer 会停止,直到应用程序返回前台。那么 Iphone 默认时钟应用程序的计时器是如何工作的呢?
谢谢!
It seems that an NSTimer created in the background stalls till the app is brought back into foreground. How does the Iphone default Clock app's timer work then?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
硬件中有一个实时时钟,操作系统将与其交互。它通过 C API 公开时钟,这可能是时钟应用程序正在使用的。
另外,苹果对他们的应用程序在后台可以执行的操作没有限制,就像我们第三方开发人员所做的那样。
There's a real time clock in hardware, and the operating system will interface with it. It exposes the clock via a C API which is likely what the Clock app is using.
Plus, Apple has no limitation on what they can do in the background with their applications like we third party devs do.