react-native-navigation 7.30.2 → 7.30.3
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.
|
@@ -1,57 +1,6 @@
|
|
|
1
1
|
#import "RNNComponentView.h"
|
|
2
|
-
#import "RCTHelpers.h"
|
|
3
2
|
|
|
4
3
|
@implementation RNNComponentView {
|
|
5
|
-
BOOL _observeLayerChange;
|
|
6
4
|
}
|
|
7
5
|
|
|
8
|
-
- (void)layoutSubviews {
|
|
9
|
-
[super layoutSubviews];
|
|
10
|
-
#ifdef DEBUG
|
|
11
|
-
[self removeYellowBox];
|
|
12
|
-
#endif
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
#ifdef DEBUG
|
|
16
|
-
- (void)removeYellowBox {
|
|
17
|
-
if (self.subviews.count > 0 && self.subviews.firstObject.subviews.count > 0) {
|
|
18
|
-
if (!_observeLayerChange) {
|
|
19
|
-
[self.subviews.firstObject.subviews.firstObject.layer
|
|
20
|
-
addObserver:self
|
|
21
|
-
forKeyPath:@"sublayers"
|
|
22
|
-
options:NSKeyValueObservingOptionNew
|
|
23
|
-
context:nil];
|
|
24
|
-
_observeLayerChange = YES;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
for (UIView *view in self.subviews.firstObject.subviews.firstObject.subviews) {
|
|
28
|
-
if ([view.accessibilityLabel isEqualToString:@"! Yellow Box"]) {
|
|
29
|
-
view.layer.opacity = 0;
|
|
30
|
-
view.layer.zPosition = -100;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
- (void)observeValueForKeyPath:(NSString *)keyPath
|
|
37
|
-
ofObject:(id)object
|
|
38
|
-
change:(NSDictionary *)change
|
|
39
|
-
context:(void *)context {
|
|
40
|
-
if ([keyPath isEqualToString:@"sublayers"]) {
|
|
41
|
-
if (((CALayer *)object).sublayers.count > 1) {
|
|
42
|
-
((CALayer *)object).sublayers.lastObject.opacity = 0;
|
|
43
|
-
((CALayer *)object).sublayers.lastObject.zPosition = -100;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
- (void)dealloc {
|
|
49
|
-
if (_observeLayerChange) {
|
|
50
|
-
[self.subviews.firstObject.subviews.firstObject.layer removeObserver:self
|
|
51
|
-
forKeyPath:@"sublayers"];
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
#endif
|
|
56
|
-
|
|
57
6
|
@end
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
|
|
192
192
|
- (UIViewController *)topPresentedVC {
|
|
193
193
|
UIViewController *root = [self rootViewController];
|
|
194
|
-
while (root.presentedViewController) {
|
|
194
|
+
while (root.presentedViewController && !root.presentedViewController.isBeingDismissed) {
|
|
195
195
|
root = root.presentedViewController;
|
|
196
196
|
}
|
|
197
197
|
return root;
|