Reputation: 533
Is there a way of tracking the amount of time the app is in background and display the same when the app enters foreground in iOS?
Upvotes: 0
Views: 727
Reputation: 601
A simple way could be to save the date into NSUserDefaults in your app delegate's applicationDidEnterBackground:
method, then compare the date from the defaults to the current date in your applicationWillEnterForeground:
method. Would that work for you?
Upvotes: 5