应用程序确实进入后台功能
嘿,我的firstViewController中有一个相当低的间隔计时器,我想在应用程序进入后台时终止它,但是我应该如何从该函数所在的应用程序AppDelegate文件访问它。我知道这是一个非常愚蠢的问题,但我将不胜感激。谢谢!
Hey I got a pretty low interval timer in my firstViewController which I would like to terminate when the app enters background, but how am I supposed to access it from my Applications AppDelegate file where the function is located. I know this is extremely dumb question, but I would appreciate help. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在你的firstViewController中,你会监听 UIApplicationDidEnterBackgroundNotification。
在firstViewController的init方法中:
In your firstViewController, you would listen for UIApplicationDidEnterBackgroundNotification.
In the firstViewController init method: