Permalink
Browse files

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
  • Loading branch information...
1 parent b644b42 commit 0ce2bbdd644dab688c052d5bd2391e563c5fd98d @mmmulani mmmulani committed with Facebook Github Bot 7 Sep 26, 2016
Showing with 3 additions and 3 deletions.
  1. +3 −3 React/Views/RCTModalHostView.m
@@ -37,7 +37,7 @@ - (instancetype)initWithBridge:(RCTBridge *)bridge
_bridge = bridge;
_modalViewController = [RCTModalHostViewController new];
UIView *containerView = [UIView new];
- containerView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
+ containerView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
_modalViewController.view = containerView;
_touchHandler = [[RCTTouchHandler alloc] initWithBridge:bridge];
_isPresented = NO;
@@ -148,7 +148,7 @@ - (void)invalidate
- (BOOL)isTransparent
{
- return _modalViewController.modalPresentationStyle == UIModalPresentationCustom;
+ return _modalViewController.modalPresentationStyle == UIModalPresentationOverFullScreen;
}
- (BOOL)hasAnimationType
@@ -158,7 +158,7 @@ - (BOOL)hasAnimationType
- (void)setTransparent:(BOOL)transparent
{
- _modalViewController.modalPresentationStyle = transparent ? UIModalPresentationCustom : UIModalPresentationFullScreen;
+ _modalViewController.modalPresentationStyle = transparent ? UIModalPresentationOverFullScreen : UIModalPresentationFullScreen;
}
- (UIInterfaceOrientationMask)supportedOrientationsMask

0 comments on commit 0ce2bbd

Please sign in to comment.