0

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

4

2 に答える 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 に答える