84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
我们的应用有倒计时,但是如果应用在后台2个小时后在打开,应用没有被kill,这时我希望知道应用已经2小时了,想刷新倒计时间啊。
1、系统有获取应用运行时间的方法吗?2、自己记录时间,应用用什么方法?最佳实践?
认证高级PHP讲师
Record the current time when entering the background (applicationDidEnterBackground:)
Record the current time when entering the front desk (applicationWillEnterForeground:)
Just subtract the two times
Record the current time when entering the background (applicationDidEnterBackground:)
Record the current time when entering the front desk (applicationWillEnterForeground:)
Just subtract the two times