File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -138,25 +138,29 @@ - (void)callWillTransitionShort {
138
138
139
139
- (void )layoutSubviews {
140
140
[self setPresentGlobally: _presentGlobally];
141
+ [self setVisible: _visible];
141
142
[super layoutSubviews ];
142
143
}
143
144
144
145
- (void )setPresentGlobally : (BOOL )presentGlobally {
145
- outerView = presentGlobally ? nil : self.reactSuperview ;
146
+ outerView = presentGlobally ? nil : self.superview ;
146
147
_presentGlobally = presentGlobally;
147
148
}
148
149
149
150
- (void )setVisible : (BOOL )visible {
150
151
_visible = visible;
151
152
[self setPresentGlobally: _presentGlobally];
152
153
if (visible) {
153
- if (self->addedSubview == nil ) {
154
- return ;
155
- }
156
154
RCTExecuteOnMainQueue (^{
155
+ if (self->outerView == nil && !_presentGlobally) {
156
+ return ;
157
+ }
157
158
if (self->_modalPresented ) {
158
159
return ;
159
160
}
161
+ if (self->addedSubview == nil ) {
162
+ return ;
163
+ }
160
164
UIViewController *rootViewController = [UIApplication sharedApplication ].delegate .window .rootViewController ;
161
165
object_setClass (self->addedSubview , [HelperView class ]);
162
166
[(HelperView *)self ->addedSubview setBridge: self ->_bridge];
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class PossiblyTouchesPassableUIView: UIView {
47
47
override func layoutSubviews( ) {
48
48
super. layoutSubviews ( )
49
49
let outerView = self . config? . value ( forKey: " outerView " ) as? UIView
50
- if ( outerView != nil ) {
50
+ if ( ! ( self . config! . value ( forKey : " presentGlobally " ) as! Bool ) ) {
51
51
removeFromSuperview ( )
52
52
let helperView : UIView = self . subviews [ 1 ] . subviews [ 0 ]
53
53
let bounds = outerView!. bounds
You can’t perform that action at this time.
0 commit comments