2015-07-28 14:31:26 +00:00
|
|
|
/**
|
2018-09-11 22:27:47 +00:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2015-07-28 14:31:26 +00:00
|
|
|
*
|
2018-02-17 02:24:55 +00: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 14:31:26 +00:00
|
|
|
*/
|
|
|
|
|
2016-11-23 15:47:52 +00:00
|
|
|
#import <React/RCTInvalidating.h>
|
|
|
|
#import <React/RCTViewManager.h>
|
2017-06-21 02:02:27 +00:00
|
|
|
#import <React/RCTConvert.h>
|
|
|
|
|
|
|
|
@interface RCTConvert (RCTModalHostView)
|
|
|
|
|
|
|
|
+ (UIModalPresentationStyle)UIModalPresentationStyle:(id)json;
|
|
|
|
|
|
|
|
@end
|
2015-08-13 16:09:10 +00:00
|
|
|
|
2016-08-23 23:50:23 +00:00
|
|
|
typedef void (^RCTModalViewInteractionBlock)(UIViewController *reactViewController, UIViewController *viewController, BOOL animated, dispatch_block_t completionBlock);
|
|
|
|
|
2015-08-13 16:09:10 +00:00
|
|
|
@interface RCTModalHostViewManager : RCTViewManager <RCTInvalidating>
|
2015-07-28 14:31:26 +00:00
|
|
|
|
2016-08-23 23:50:23 +00:00
|
|
|
/**
|
|
|
|
* `presentationBlock` and `dismissalBlock` allow you to control how a Modal interacts with your case,
|
|
|
|
* e.g. in case you have a native navigator that has its own way to display a modal.
|
|
|
|
* If these are not specified, it falls back to the UIViewController standard way of presenting.
|
|
|
|
*/
|
|
|
|
@property (nonatomic, strong) RCTModalViewInteractionBlock presentationBlock;
|
|
|
|
@property (nonatomic, strong) RCTModalViewInteractionBlock dismissalBlock;
|
|
|
|
|
2015-07-28 14:31:26 +00:00
|
|
|
@end
|