|
@@ -1,4 +1,5 @@
|
1
|
1
|
#import "RNNOverlayManager.h"
|
|
2
|
+#import "RNNErrorHandler.h"
|
2
|
3
|
|
3
|
4
|
@implementation RNNOverlayManager {
|
4
|
5
|
NSMutableDictionary* _overlayDict;
|
|
@@ -20,10 +21,14 @@
|
20
|
21
|
completion();
|
21
|
22
|
}
|
22
|
23
|
|
23
|
|
-- (void)dismissOverlay:(NSString*)componentId completion:(RNNTransitionCompletionBlock)completion {
|
|
24
|
+- (void)dismissOverlay:(NSString*)componentId completion:(RNNTransitionCompletionBlock)completion rejection:(RNNTransitionRejectionBlock)reject {
|
24
|
25
|
RNNRootViewController* viewController = [_overlayDict objectForKey:componentId];
|
25
|
|
- [self removeCachedOverlay:viewController];
|
26
|
|
- completion();
|
|
26
|
+ if (viewController) {
|
|
27
|
+ [self removeCachedOverlay:viewController];
|
|
28
|
+ completion();
|
|
29
|
+ } else {
|
|
30
|
+ [RNNErrorHandler reject:reject withErrorCode:1010 errorDescription:@"ComponentId not found"];
|
|
31
|
+ }
|
27
|
32
|
}
|
28
|
33
|
|
29
|
34
|
#pragma mark - private
|