mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 01:25:39 +00:00
ec68536e08
Summary: When using `<Modal` on larger iOS devices, esp. iPad and iPhone 7 Plus devices, there is no way to use the system functionality for controlling the appearance of modals (`presentationStyle`), which improves the native system's animation and display of smaller content appearing within large horizontal space. I've added a new picker for selecting a `presentationStyle` within the RNTester app. See below for the appearance of this change, as well as the relevant changes to the RN documentation. ![may-22-2017 09-49-50](https://cloud.githubusercontent.com/assets/3521186/26315020/6d4b1cb0-3ed5-11e7-8ac8-a996f1ee00f9.gif) <img width="1051" alt="screen shot 2017-05-22 at 9 50 12 am" src="https://cloud.githubusercontent.com/assets/3521186/26315021/6d4cbf7a-3ed5-11e7-9d13-a5d20c9f3533.png"> Closes https://github.com/facebook/react-native/pull/14102 Differential Revision: D5281990 Pulled By: shergin fbshipit-source-id: 882d8cb79e7adb0b4437cdf26e5e7ab1fc04f4c1
44 lines
1.5 KiB
Objective-C
44 lines
1.5 KiB
Objective-C
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#import <React/RCTInvalidating.h>
|
|
#import <React/RCTModalHostViewManager.h>
|
|
#import <React/RCTView.h>
|
|
|
|
@class RCTBridge;
|
|
@class RCTModalHostViewController;
|
|
|
|
@protocol RCTModalHostViewInteractor;
|
|
|
|
@interface RCTModalHostView : UIView <RCTInvalidating>
|
|
|
|
@property (nonatomic, copy) NSString *animationType;
|
|
@property (nonatomic, assign) UIModalPresentationStyle presentationStyle;
|
|
@property (nonatomic, assign, getter=isTransparent) BOOL transparent;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onShow;
|
|
|
|
@property (nonatomic, weak) id<RCTModalHostViewInteractor> delegate;
|
|
|
|
@property (nonatomic, copy) NSArray<NSString *> *supportedOrientations;
|
|
@property (nonatomic, copy) RCTDirectEventBlock onOrientationChange;
|
|
|
|
- (instancetype)initWithBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
|
|
|
|
@end
|
|
|
|
@protocol RCTModalHostViewInteractor <NSObject>
|
|
|
|
- (void)presentModalHostView:(RCTModalHostView *)modalHostView withViewController:(RCTModalHostViewController *)viewController animated:(BOOL)animated;
|
|
- (void)dismissModalHostView:(RCTModalHostView *)modalHostView withViewController:(RCTModalHostViewController *)viewController animated:(BOOL)animated;
|
|
|
|
@end
|