Skip to content

Commit 0ce2bbd

Browse files
Mehdi MulaniFacebook Github Bot 7
authored andcommitted
Fix Modal to handle in-call status bar
Summary: Changing the Modal's presentation style ensures that UIKit correctly adjusts its bounds when entering/exiting the in-call status bar. Reviewed By: fkgozali Differential Revision: D3916167 fbshipit-source-id: a0bea60751744ac082ba6ec38177fb093a8f2be5
1 parent b644b42 commit 0ce2bbd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

React/Views/RCTModalHostView.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge
3737
_bridge = bridge;
3838
_modalViewController = [RCTModalHostViewController new];
3939
UIView *containerView = [UIView new];
40-
containerView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
40+
containerView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
4141
_modalViewController.view = containerView;
4242
_touchHandler = [[RCTTouchHandler alloc] initWithBridge:bridge];
4343
_isPresented = NO;
@@ -148,7 +148,7 @@ - (void)invalidate
148148

149149
- (BOOL)isTransparent
150150
{
151-
return _modalViewController.modalPresentationStyle == UIModalPresentationCustom;
151+
return _modalViewController.modalPresentationStyle == UIModalPresentationOverFullScreen;
152152
}
153153

154154
- (BOOL)hasAnimationType
@@ -158,7 +158,7 @@ - (BOOL)hasAnimationType
158158

159159
- (void)setTransparent:(BOOL)transparent
160160
{
161-
_modalViewController.modalPresentationStyle = transparent ? UIModalPresentationCustom : UIModalPresentationFullScreen;
161+
_modalViewController.modalPresentationStyle = transparent ? UIModalPresentationOverFullScreen : UIModalPresentationFullScreen;
162162
}
163163

164164
- (UIInterfaceOrientationMask)supportedOrientationsMask

0 commit comments

Comments
 (0)