@@ -27,8 +27,8 @@ @interface DZNWebViewController ()
2727@property (nonatomic , strong ) UILongPressGestureRecognizer *backwardLongPress;
2828@property (nonatomic , strong ) UILongPressGestureRecognizer *forwardLongPress;
2929
30- @property (nonatomic , strong ) UINavigationBar *navigationBar;
3130@property (nonatomic , weak ) UIToolbar *toolbar;
31+ @property (nonatomic , strong ) UINavigationBar *navigationBar;
3232@property (nonatomic , weak ) UIView *navigationBarSuperView;
3333
3434@property (nonatomic ) BOOL completedInitialLoad;
@@ -876,12 +876,12 @@ - (void)viewDidUnload
876876
877877- (void )dealloc
878878{
879- if (_hideBarsWithGestures ) {
880- [_navigationBar removeObserver: self forKeyPath: @" hidden" context: &DZNWebViewControllerKVOContext];
881- [_navigationBar removeObserver: self forKeyPath: @" center" context: &DZNWebViewControllerKVOContext];
882- [_navigationBar removeObserver: self forKeyPath: @" alpha" context: &DZNWebViewControllerKVOContext];
879+ if (self. hideBarsWithGestures ) {
880+ [self .navigationBar removeObserver: self forKeyPath: @" hidden" context: &DZNWebViewControllerKVOContext];
881+ [self .navigationBar removeObserver: self forKeyPath: @" center" context: &DZNWebViewControllerKVOContext];
882+ [self .navigationBar removeObserver: self forKeyPath: @" alpha" context: &DZNWebViewControllerKVOContext];
883883 }
884- [_webView removeObserver: self forKeyPath: @" loading" context: &DZNWebViewControllerKVOContext];
884+ [self .webView removeObserver: self forKeyPath: @" loading" context: &DZNWebViewControllerKVOContext];
885885
886886 _backwardBarItem = nil ;
887887 _forwardBarItem = nil ;
0 commit comments