Skip to content
This repository was archived by the owner on Nov 29, 2022. It is now read-only.

Commit 0648cde

Browse files
committed
- Revert dealloc logic regarding direct reference to ivars
1 parent b089ac0 commit 0648cde

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Source/Classes/DZNWebViewController.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)