Skip to content

Commit

Permalink
Fix Modal to handle in-call status bar
Browse files Browse the repository at this point in the history
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
Mehdi Mulani authored and Facebook Github Bot 7 committed Sep 26, 2016
1 parent b644b42 commit 0ce2bbd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions React/Views/RCTModalHostView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -148,7 +148,7 @@ - (void)invalidate

- (BOOL)isTransparent
{
return _modalViewController.modalPresentationStyle == UIModalPresentationCustom;
return _modalViewController.modalPresentationStyle == UIModalPresentationOverFullScreen;
}

- (BOOL)hasAnimationType
Expand All @@ -158,7 +158,7 @@ - (BOOL)hasAnimationType

- (void)setTransparent:(BOOL)transparent
{
_modalViewController.modalPresentationStyle = transparent ? UIModalPresentationCustom : UIModalPresentationFullScreen;
_modalViewController.modalPresentationStyle = transparent ? UIModalPresentationOverFullScreen : UIModalPresentationFullScreen;
}

- (UIInterfaceOrientationMask)supportedOrientationsMask
Expand Down

0 comments on commit 0ce2bbd

Please sign in to comment.