Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions AXWebViewController/AXWebViewController/AXWebViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -504,10 +504,19 @@ - (void)dealloc {
#if AX_WEB_VIEW_CONTROLLER_USING_WEBKIT
_webView.UIDelegate = nil;
_webView.navigationDelegate = nil;
[_webView removeObserver:self forKeyPath:@"estimatedProgress"];
[_webView removeObserver:self forKeyPath:@"scrollView.contentOffset"];
[_webView removeObserver:self forKeyPath:@"title"];
// [_webView.scrollView removeObserver:self forKeyPath:@"backgroundColor"];
@try{
[_webView removeObserver:self forKeyPath:@"estimatedProgress"];
[_webView removeObserver:self forKeyPath:@"scrollView.contentOffset"];
[_webView removeObserver:self forKeyPath:@"title"];
// [_webView.scrollView removeObserver:self forKeyPath:@"backgroundColor"];
}
@catch (NSException *exception) {
NSLog(@"%@", exception.reason);
}
@finally {
NSLog(@"remove webview Observer fail");
}

#else
_webView.delegate = nil;
#endif
Expand Down