2019-10-16 20:03:47 +03:00
|
|
|
/*
|
2021-12-31 02:08:43 +03:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2015-07-28 17:31:26 +03:00
|
|
|
*
|
2018-02-17 05:24:55 +03:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2015-07-28 17:31:26 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
2016-11-23 18:47:52 +03:00
|
|
|
#import <React/RCTInvalidating.h>
|
|
|
|
#import <React/RCTModalHostViewManager.h>
|
|
|
|
#import <React/RCTView.h>
|
2015-08-13 19:09:10 +03:00
|
|
|
|
2015-07-28 17:31:26 +03:00
|
|
|
@class RCTBridge;
|
2016-08-24 02:50:23 +03:00
|
|
|
@class RCTModalHostViewController;
|
|
|
|
|
|
|
|
@protocol RCTModalHostViewInteractor;
|
2015-07-28 17:31:26 +03:00
|
|
|
|
2021-08-16 21:24:28 +03:00
|
|
|
@interface RCTModalHostView : UIView <RCTInvalidating, UIAdaptivePresentationControllerDelegate>
|
2015-07-28 17:31:26 +03:00
|
|
|
|
2016-04-29 01:59:11 +03:00
|
|
|
@property (nonatomic, copy) NSString *animationType;
|
2017-06-21 05:02:27 +03:00
|
|
|
@property (nonatomic, assign) UIModalPresentationStyle presentationStyle;
|
2015-08-13 19:09:10 +03:00
|
|
|
@property (nonatomic, assign, getter=isTransparent) BOOL transparent;
|
2015-07-28 17:31:26 +03:00
|
|
|
|
2016-03-03 23:42:41 +03:00
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onShow;
|
2021-05-03 01:41:22 +03:00
|
|
|
@property (nonatomic, assign) BOOL visible;
|
2016-03-03 23:42:41 +03:00
|
|
|
|
2022-01-15 03:29:10 +03:00
|
|
|
// Android only
|
|
|
|
@property (nonatomic, assign) BOOL statusBarTranslucent;
|
|
|
|
@property (nonatomic, assign) BOOL hardwareAccelerated;
|
|
|
|
@property (nonatomic, assign) BOOL animated;
|
|
|
|
|
2017-09-22 00:46:42 +03:00
|
|
|
@property (nonatomic, copy) NSNumber *identifier;
|
|
|
|
|
2016-08-24 02:50:23 +03:00
|
|
|
@property (nonatomic, weak) id<RCTModalHostViewInteractor> delegate;
|
|
|
|
|
2016-09-07 16:06:12 +03:00
|
|
|
@property (nonatomic, copy) NSArray<NSString *> *supportedOrientations;
|
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onOrientationChange;
|
|
|
|
|
2021-05-03 01:41:22 +03:00
|
|
|
// Fabric only
|
2022-03-04 05:06:08 +03:00
|
|
|
@property (nonatomic, copy) RCTDirectEventBlock onDismiss;
|
2021-05-03 01:41:22 +03:00
|
|
|
|
2015-07-28 17:31:26 +03:00
|
|
|
- (instancetype)initWithBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
|
|
|
|
|
|
|
|
@end
|
2016-08-24 02:50:23 +03:00
|
|
|
|
|
|
|
@protocol RCTModalHostViewInteractor <NSObject>
|
|
|
|
|
2020-03-09 08:58:01 +03:00
|
|
|
- (void)presentModalHostView:(RCTModalHostView *)modalHostView
|
|
|
|
withViewController:(RCTModalHostViewController *)viewController
|
|
|
|
animated:(BOOL)animated;
|
|
|
|
- (void)dismissModalHostView:(RCTModalHostView *)modalHostView
|
|
|
|
withViewController:(RCTModalHostViewController *)viewController
|
|
|
|
animated:(BOOL)animated;
|
2016-08-24 02:50:23 +03:00
|
|
|
|
|
|
|
@end
|