アプリがフォアグラウンドになったときに、View Controller で WebView をリロードしたいと考えています。アプリケーションのデリゲート-applicationWillEnterForeground
と-applicationDidBecomeActive
メソッドでビュー コントローラー オブジェクトを作成しました。しかし、ウェブビューを更新できません。
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 に答える