mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 04:24:15 +00:00
a389ffbd84
Summary: Adds an onDismiss so that navigation events can be chained to the dismissing of a modal. Reviewed By: sahrens Differential Revision: D5852953 fbshipit-source-id: a86e36fdd5b0b206c2dd9fa248e2a88da22efa31
27 lines
602 B
Objective-C
27 lines
602 B
Objective-C
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#import "RCTModalManager.h"
|
|
|
|
@implementation RCTModalManager
|
|
|
|
RCT_EXPORT_MODULE();
|
|
|
|
- (NSArray<NSString *> *)supportedEvents
|
|
{
|
|
return @[ @"modalDismissed" ];
|
|
}
|
|
|
|
- (void)modalDismissed:(NSNumber *)modalID
|
|
{
|
|
[self sendEventWithName:@"modalDismissed" body:@{ @"modalID": modalID }];
|
|
}
|
|
|
|
@end
|