mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
0932a0d775
Summary: Changelog: [Fabric][iOS][Fix] Remove use of bridge from Modal by dismissing Modal with visible prop Reviewed By: sammy-SC Differential Revision: D28074326 fbshipit-source-id: 0278bfb031db802b59429c553ac62d83838f4cc9
33 lines
1.1 KiB
Objective-C
33 lines
1.1 KiB
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/RCTMountingTransactionObserving.h>
|
|
#import <React/RCTViewComponentView.h>
|
|
|
|
/**
|
|
* UIView class for root <ModalHostView> component.
|
|
*/
|
|
@interface RCTModalHostViewComponentView : RCTViewComponentView <RCTMountingTransactionObserving>
|
|
|
|
/**
|
|
* 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
|
|
completion:(void (^)(void))completion;
|
|
|
|
@end
|