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

Commit ba2aca6

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

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Source/Classes/DZNWebViewController.m

Lines changed: 4 additions & 4 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;
@@ -877,9 +877,9 @@ - (void)viewDidUnload
877877
- (void)dealloc
878878
{
879879
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];
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
}
884884
[_webView removeObserver:self forKeyPath:@"loading" context:&DZNWebViewControllerKVOContext];
885885

0 commit comments

Comments
 (0)