|
@@ -34,11 +34,10 @@ static NSString* const setDefaultOptions = @"setDefaultOptions";
|
34
|
34
|
RNNOverlayManager* _overlayManager;
|
35
|
35
|
RNNNavigationStackManager* _stackManager;
|
36
|
36
|
RNNEventEmitter* _eventEmitter;
|
37
|
|
- UIApplication* _sharedApplication;
|
38
|
37
|
UIWindow* _mainWindow;
|
39
|
38
|
}
|
40
|
39
|
|
41
|
|
-- (instancetype)initWithStore:(RNNStore*)store controllerFactory:(RNNControllerFactory*)controllerFactory eventEmitter:(RNNEventEmitter *)eventEmitter stackManager:(RNNNavigationStackManager *)stackManager modalManager:(RNNModalManager *)modalManager overlayManager:(RNNOverlayManager *)overlayManager sharedApplication:(UIApplication *)sharedApplication {
|
|
40
|
+- (instancetype)initWithStore:(RNNStore*)store controllerFactory:(RNNControllerFactory*)controllerFactory eventEmitter:(RNNEventEmitter *)eventEmitter stackManager:(RNNNavigationStackManager *)stackManager modalManager:(RNNModalManager *)modalManager overlayManager:(RNNOverlayManager *)overlayManager mainWindow:(UIWindow *)mainWindow {
|
42
|
41
|
self = [super init];
|
43
|
42
|
_store = store;
|
44
|
43
|
_controllerFactory = controllerFactory;
|
|
@@ -47,7 +46,7 @@ static NSString* const setDefaultOptions = @"setDefaultOptions";
|
47
|
46
|
_modalManager.delegate = self;
|
48
|
47
|
_stackManager = stackManager;
|
49
|
48
|
_overlayManager = overlayManager;
|
50
|
|
- _sharedApplication = sharedApplication;
|
|
49
|
+ _mainWindow = mainWindow;
|
51
|
50
|
return self;
|
52
|
51
|
}
|
53
|
52
|
|
|
@@ -56,10 +55,6 @@ static NSString* const setDefaultOptions = @"setDefaultOptions";
|
56
|
55
|
- (void)setRoot:(NSDictionary*)layout completion:(RNNTransitionCompletionBlock)completion {
|
57
|
56
|
[self assertReady];
|
58
|
57
|
|
59
|
|
- if (!_mainWindow) {
|
60
|
|
- _mainWindow = _sharedApplication.keyWindow;
|
61
|
|
- }
|
62
|
|
-
|
63
|
58
|
[_modalManager dismissAllModalsAnimated:NO];
|
64
|
59
|
[_store removeAllComponentsFromWindow:_mainWindow];
|
65
|
60
|
|