|
|
|
|
172
|
if ([self.topViewController isKindOfClass:[RCCViewController class]])
|
172
|
if ([self.topViewController isKindOfClass:[RCCViewController class]])
|
173
|
{
|
173
|
{
|
174
|
RCCViewController *topViewController = ((RCCViewController*)self.topViewController);
|
174
|
RCCViewController *topViewController = ((RCCViewController*)self.topViewController);
|
|
|
175
|
+ topViewController.previewController = nil;
|
|
|
176
|
+ [topViewController.navigationController unregisterForPreviewingWithContext:topViewController.previewContext];
|
175
|
viewController.previewActions = previewActions;
|
177
|
viewController.previewActions = previewActions;
|
176
|
viewController.previewCommit = actionParams[@"previewCommit"] ? [actionParams[@"previewCommit"] boolValue] : YES;
|
178
|
viewController.previewCommit = actionParams[@"previewCommit"] ? [actionParams[@"previewCommit"] boolValue] : YES;
|
177
|
NSNumber *previewHeight = actionParams[@"previewHeight"];
|
179
|
NSNumber *previewHeight = actionParams[@"previewHeight"];
|
|
|
|
|
184
|
[bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
186
|
[bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
185
|
UIView *view = viewRegistry[previewViewID];
|
187
|
UIView *view = viewRegistry[previewViewID];
|
186
|
topViewController.previewView = view;
|
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
|
topViewController.previewController = viewController;
|
192
|
topViewController.previewController = viewController;
|