【发布时间】:2012-03-09 14:01:52
【问题描述】:
我的应用在视图中包含时间敏感信息,当用户从非活动/暂停状态调用应用时,这些信息需要更新。下面的两个应用程序委托方法中的哪一个应该处理这个问题?
这里:
- (void)applicationDidBecomeActive:(UIApplication *)application{
//Check to see if we need to refresh a view
if([self needToRefreshView])
[viewcontroller1 refreshView];
}
或
这里:
- (void)applicationWillEnterForeground:(UIApplication *)application{
//Check to see if we need to refresh a view
if([self needToRefreshView])
[viewcontroller1 refreshView];
}
一种方法比另一种更适合这个吗?如果是,为什么?
谢谢
【问题讨论】:
标签: ios5 uiapplicationdelegate