mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-01 22:41:28 +08:00
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
This commit is contained in:
committed by
Facebook Github Bot 7
parent
b644b426af
commit
0ce2bbdd64
@@ -37,7 +37,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:coder)
|
||||
_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 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:coder)
|
||||
|
||||
- (BOOL)isTransparent
|
||||
{
|
||||
return _modalViewController.modalPresentationStyle == UIModalPresentationCustom;
|
||||
return _modalViewController.modalPresentationStyle == UIModalPresentationOverFullScreen;
|
||||
}
|
||||
|
||||
- (BOOL)hasAnimationType
|
||||
@@ -158,7 +158,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:coder)
|
||||
|
||||
- (void)setTransparent:(BOOL)transparent
|
||||
{
|
||||
_modalViewController.modalPresentationStyle = transparent ? UIModalPresentationCustom : UIModalPresentationFullScreen;
|
||||
_modalViewController.modalPresentationStyle = transparent ? UIModalPresentationOverFullScreen : UIModalPresentationFullScreen;
|
||||
}
|
||||
|
||||
- (UIInterfaceOrientationMask)supportedOrientationsMask
|
||||
|
||||
Reference in New Issue
Block a user