mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Changelog: [Internal] Fabric removes components bottom up (from leafs to the root). This means that by the time Fabric hides Modal, it has no content and therefore it appears as if Modal disappears without Animation. To fix this, we snapshot contents of the Modal before any of its contents are removed. Reviewed By: shergin Differential Revision: D23976244 fbshipit-source-id: 01c13b74e97f82816e8946fd9d1add1db10340b1
31 lines
1.0 KiB
Objective-C
31 lines
1.0 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;
|
|
|
|
@end
|