判断进入后台
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(xxx:)
name:UIApplicationWillEnterForegroundNotification object:nil];
是否跳转第三方
- (BOOL)webView :(UIWebView *)webView shouldStartLoadWithRequest :(NSURLRequest *)request navigationType :(UIWebViewNavigationType)navigationType {
BOOL isHTTPOrLocalFile = [request.URL.scheme isEqualToString :@"http"] || [request.URL.scheme isEqualToString :@"https"] || [request.URL.scheme isEqualToString :@"file"];
if (!isHTTPOrLocalFile) {
_thirdApp = YES;
}
return YES;
}