hybrid-navigation 2.12.3 → 2.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,8 @@
9
9
  #import "HBDNavigationBar.h"
10
10
  #import "HBDUtils.h"
11
11
 
12
+ #define hairlineWidth (1.f/[UIScreen mainScreen].scale)
13
+
12
14
  @interface HBDNavigationBar ()
13
15
 
14
16
  @property(nonatomic, strong, readwrite) UIImageView *fakeShadowView;
@@ -60,13 +62,13 @@
60
62
  - (void)layoutSubviews {
61
63
  [super layoutSubviews];
62
64
  self.fakeBackgroundView.frame = self.fakeBackgroundView.superview.bounds;
63
- self.fakeShadowView.frame = CGRectMake(0, CGRectGetHeight(self.fakeShadowView.superview.bounds), CGRectGetWidth(self.fakeShadowView.superview.bounds), 0.5);
65
+ self.fakeShadowView.frame = CGRectMake(0, CGRectGetHeight(self.fakeShadowView.superview.bounds) - hairlineWidth, CGRectGetWidth(self.fakeShadowView.superview.bounds), hairlineWidth);
64
66
  }
65
67
 
66
68
  - (void)setBarTintColor:(UIColor *)barTintColor {
67
69
  [super setBarTintColor:barTintColor];
68
70
  self.fakeBackgroundView.backgroundColor = barTintColor;
69
- [self makesureFakeBackgroundView];
71
+ [self makesureFakeView];
70
72
  }
71
73
 
72
74
  - (UIView *)fakeBackgroundView {
@@ -75,7 +77,6 @@
75
77
  _fakeBackgroundView = [[UIView alloc] init];
76
78
  _fakeBackgroundView.userInteractionEnabled = NO;
77
79
  _fakeBackgroundView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
78
- [[self.subviews firstObject] insertSubview:_fakeBackgroundView atIndex:0];
79
80
  }
80
81
  return _fakeBackgroundView;
81
82
  }
@@ -96,6 +97,7 @@
96
97
  } else {
97
98
  self.fakeShadowView.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:77.0 / 255];
98
99
  }
100
+
99
101
  }
100
102
 
101
103
  - (UIImageView *)fakeShadowView {
@@ -104,21 +106,21 @@
104
106
  _fakeShadowView = [[UIImageView alloc] init];
105
107
  _fakeShadowView.userInteractionEnabled = NO;
106
108
  _fakeShadowView.contentScaleFactor = 1;
107
- [[self.subviews firstObject] insertSubview:_fakeShadowView aboveSubview:self.fakeBackgroundView];
109
+ _fakeShadowView.layer.allowsEdgeAntialiasing = YES;
108
110
  }
109
111
  return _fakeShadowView;
110
112
  }
111
113
 
112
- - (void)makesureFakeBackgroundView {
114
+ - (void)makesureFakeView {
113
115
  [UIView setAnimationsEnabled:NO];
114
116
  if (!self.fakeBackgroundView.superview) {
115
- [[self.subviews firstObject] insertSubview:_fakeBackgroundView atIndex:0];
117
+ [[self.subviews firstObject] insertSubview:self.fakeBackgroundView atIndex:0];
116
118
  self.fakeBackgroundView.frame = self.fakeBackgroundView.superview.bounds;
117
119
  }
118
120
 
119
121
  if (!self.fakeShadowView.superview) {
120
- [[self.subviews firstObject] insertSubview:_fakeShadowView aboveSubview:self.fakeBackgroundView];
121
- self.fakeShadowView.frame = CGRectMake(0, CGRectGetHeight(self.fakeShadowView.superview.bounds), CGRectGetWidth(self.fakeShadowView.superview.bounds), 0.5);
122
+ [[self.subviews firstObject] insertSubview:self.fakeShadowView aboveSubview:self.fakeBackgroundView];
123
+ self.fakeShadowView.frame = CGRectMake(0, CGRectGetHeight(self.fakeShadowView.superview.bounds) - hairlineWidth, CGRectGetWidth(self.fakeShadowView.superview.bounds), hairlineWidth);
122
124
  }
123
125
  [UIView setAnimationsEnabled:YES];
124
126
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hybrid-navigation",
3
3
  "description": "React Native Navigation that supports seamless navigation between Native and React.",
4
- "version": "2.12.3",
4
+ "version": "2.12.4",
5
5
  "main": "./lib/index.js",
6
6
  "typings": "./lib/index.d.ts",
7
7
  "react-native": "src/index",