My app has time-sensitive information in a view that will need to be updated, when the app is recalled by the user, from an inactive/suspended state. Which of the two app delegate methods below should handle this?
Here:
- (void)applicationDidBecomeActive:(UIApplication *)application{
//Check to see if we need to refresh a view
if([self needToRefreshView])
[viewcontroller1 refreshView];
}
or
Here:
- (void)applicationWillEnterForeground:(UIApplication *)application{
//Check to see if we need to refresh a view
if([self needToRefreshView])
[viewcontroller1 refreshView];
}
Is one method better suited for this than the other? If so, Why?
Thanks
Those should both work fine, the only other that I would consider implementing your code in is viewWillAppear
.