|
@@ -67,29 +67,14 @@ static NSString* const setDefaultOptions = @"setDefaultOptions";
|
67
|
67
|
- (void)mergeOptions:(NSString*)componentId options:(NSDictionary*)options completion:(RNNTransitionCompletionBlock)completion {
|
68
|
68
|
[self assertReady];
|
69
|
69
|
|
70
|
|
- UIViewController* vc = [_store findComponentForId:componentId];
|
71
|
|
- if([vc isKindOfClass:[RNNRootViewController class]]) {
|
72
|
|
- RNNRootViewController* rootVc = (RNNRootViewController*)vc;
|
73
|
|
- [rootVc.options mergeWith:options];
|
|
70
|
+ UIViewController<RNNRootViewProtocol>* vc = (UIViewController<RNNRootViewProtocol>*)[_store findComponentForId:componentId];
|
|
71
|
+ if ([vc conformsToProtocol:@protocol(RNNRootViewProtocol)] || [vc isKindOfClass:[RNNRootViewController class]]) {
|
|
72
|
+ [vc.getLeafViewController.options mergeWith:options];
|
74
|
73
|
[CATransaction begin];
|
75
|
74
|
[CATransaction setCompletionBlock:completion];
|
76
|
|
-
|
77
|
|
- [rootVc.options applyOn:vc];
|
78
|
|
-
|
79
|
|
- [CATransaction commit];
|
80
|
|
- }
|
81
|
|
-
|
82
|
|
- if ([vc isKindOfClass:[RNNSplitViewController class]]) {
|
83
|
|
- RNNSplitViewController* splitVc = (RNNSplitViewController*)vc;
|
84
|
|
- [splitVc.options mergeWith:options];
|
85
|
|
- [CATransaction begin];
|
86
|
|
- [CATransaction setCompletionBlock:completion];
|
87
|
|
-
|
88
|
|
- [splitVc.options applyOn:vc];
|
89
|
|
-
|
|
75
|
+ [vc.getLeafViewController.options applyOn:vc.getLeafViewController];
|
90
|
76
|
[CATransaction commit];
|
91
|
77
|
}
|
92
|
|
-
|
93
|
78
|
}
|
94
|
79
|
|
95
|
80
|
- (void)setDefaultOptions:(NSDictionary*)optionsDict completion:(RNNTransitionCompletionBlock)completion {
|