控制UIWebView goBack 不刷新

[[NSUserDefaults standardUserDefaults] setInteger:2 forKey: @"WebKitCacheModelPreferenceKey"];

[[NSUserDefaults standardUserDefaults] setInteger:1 forKey: @"WebKitMediaPlaybackAllowsInline"];

id webView = [self.webView valueForKeyPath:@"_internal.browserView._webView"];

id preferences = [webView valueForKey:@"preferences"];

[preferences performSelector:@selector(_postCacheModelChangedNotification)];

你可能感兴趣的:(iOS)