Files
react-native/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.h
T
Samuel Susla e4cfbbad6d Introduce RCTFBModalComponentView
Summary: Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D23155490

fbshipit-source-id: 2c83c2ec71ca4d842275b4db6aac7169d3d77955
2020-08-17 15:44:29 -07:00

30 lines
950 B
Objective-C

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <React/RCTViewComponentView.h>
/**
* UIView class for root <ModalHostView> component.
*/
@interface RCTModalHostViewComponentView : RCTViewComponentView
/**
* Subclasses may override this method and present the modal on different view controller.
* Default implementation presents the modal on `[self reactViewController]`.
*/
- (void)presentViewController:(UIViewController *)modalViewController
animated:(BOOL)animated
completion:(void (^)(void))completion;
/**
* Subclasses may override this method.
* Default implementation calls `[UIViewController dismissViewControllerAnimated:completion:]`.
*/
- (void)dismissViewController:(UIViewController *)modalViewController animated:(BOOL)animated;
@end