objecive-c - iOS获取当前app运行时长
PHP中文网
PHP中文网 2017-04-18 09:21:58
0
1
310

我们的应用有倒计时,但是如果应用在后台2个小时后在打开,应用没有被kill,这时我希望知道应用已经2小时了,想刷新倒计时间啊。

1、系统有获取应用运行时间的方法吗?
2、自己记录时间,应用用什么方法?最佳实践?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
大家讲道理
  1. Record the current time when entering the background (applicationDidEnterBackground:)

  2. Record the current time when entering the front desk (applicationWillEnterForeground:)

  3. Just subtract the two times

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!