|
@@ -172,6 +172,8 @@ NSString const *CALLBACK_ASSOCIATED_ID = @"RCCNavigationController.CALLBACK_ASSO
|
172
|
172
|
if ([self.topViewController isKindOfClass:[RCCViewController class]])
|
173
|
173
|
{
|
174
|
174
|
RCCViewController *topViewController = ((RCCViewController*)self.topViewController);
|
|
175
|
+ topViewController.previewController = nil;
|
|
176
|
+ [topViewController.navigationController unregisterForPreviewingWithContext:topViewController.previewContext];
|
175
|
177
|
viewController.previewActions = previewActions;
|
176
|
178
|
viewController.previewCommit = actionParams[@"previewCommit"] ? [actionParams[@"previewCommit"] boolValue] : YES;
|
177
|
179
|
NSNumber *previewHeight = actionParams[@"previewHeight"];
|
|
@@ -184,7 +186,7 @@ NSString const *CALLBACK_ASSOCIATED_ID = @"RCCNavigationController.CALLBACK_ASSO
|
184
|
186
|
[bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
185
|
187
|
UIView *view = viewRegistry[previewViewID];
|
186
|
188
|
topViewController.previewView = view;
|
187
|
|
- [topViewController registerForPreviewingWithDelegate:(id)topViewController sourceView:view];
|
|
189
|
+ topViewController.previewContext = [topViewController registerForPreviewingWithDelegate:(id)topViewController sourceView:view];
|
188
|
190
|
}];
|
189
|
191
|
});
|
190
|
192
|
topViewController.previewController = viewController;
|