当我的应用程序进入前台时,我想在我的视图控制器中重新加载一个 webview。我在我的应用程序委托-applicationWillEnterForeground
和-applicationDidBecomeActive
方法中创建了一个视图控制器对象。但我无法刷新我的 webview。
问问题
1380 次
2 回答
0
applicationWillEnterForeground 可能不是最好的方法。
在包含 webView 的类中添加如下通知方法
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(didEnterForeground)
name:UIApplicationWillEnterForegroundNotification
object:nil];
-(void) didEnterForeGround
{
//[webView reload];
}
于 2013-04-04T07:04:06.767 回答
0
当您的应用程序进入前台时,应用程序处于活动状态,特别是 viewdidload 或 viewdidAppear 方法 [WEBVIEW ReloadData] 上的视图控制器;就是这样,你不想在 appdelegate 类中做任何事情
于 2013-04-04T07:45:45.923 回答