Browse Source

Rename all the things (#5455)

Break all the PRs :(

iOS and Android code base used different naming conventions - this commit aims to unify naming conventions. I probably missed a few properties here and there so this will be an ongoing effort.
Guy Carmeli 5 years ago
parent
commit
8f2463e0da
No account linked to committer's email address
65 changed files with 960 additions and 986 deletions
  1. 1
    1
      lib/ios/RNNBasePresenter.h
  2. 23
    23
      lib/ios/RNNBasePresenter.m
  3. 2
    2
      lib/ios/RNNBottomTabsController.h
  4. 2
    2
      lib/ios/RNNBottomTabsController.m
  5. 1
    1
      lib/ios/RNNBottomTabsPresenter.h
  6. 81
    0
      lib/ios/RNNBottomTabsPresenter.m
  7. 2
    2
      lib/ios/RNNBridgeManager.m
  8. 8
    8
      lib/ios/RNNCommandsHandler.m
  9. 1
    1
      lib/ios/RNNComponentPresenter.h
  10. 59
    59
      lib/ios/RNNComponentPresenter.m
  11. 7
    7
      lib/ios/RNNComponentViewController.h
  12. 5
    10
      lib/ios/RNNComponentViewController.m
  13. 1
    1
      lib/ios/RNNComponentViewCreator.h
  14. 2
    2
      lib/ios/RNNControllerFactory.h
  15. 21
    25
      lib/ios/RNNControllerFactory.m
  16. 2
    2
      lib/ios/RNNInteractivePopAnimator.m
  17. 2
    2
      lib/ios/RNNLayoutProtocol.h
  18. 1
    1
      lib/ios/RNNModalManager.m
  19. 1
    1
      lib/ios/RNNNavigationButtons.h
  20. 1
    1
      lib/ios/RNNNavigationButtons.m
  21. 0
    12
      lib/ios/RNNNavigationController.h
  22. 0
    231
      lib/ios/RNNNavigationControllerPresenter.m
  23. 3
    3
      lib/ios/RNNNavigationOptions.m
  24. 2
    2
      lib/ios/RNNReactComponentRegistry.h
  25. 2
    2
      lib/ios/RNNReactComponentRegistry.m
  26. 2
    2
      lib/ios/RNNReactRootViewCreator.h
  27. 2
    2
      lib/ios/RNNSideMenuChildVC.h
  28. 1
    1
      lib/ios/RNNSideMenuChildVC.m
  29. 1
    1
      lib/ios/RNNSideMenuController.h
  30. 1
    1
      lib/ios/RNNSideMenuController.m
  31. 43
    44
      lib/ios/RNNSideMenuPresenter.m
  32. 2
    2
      lib/ios/RNNSplitViewControllerPresenter.h
  33. 10
    10
      lib/ios/RNNSplitViewControllerPresenter.m
  34. 12
    0
      lib/ios/RNNStackController.h
  35. 5
    5
      lib/ios/RNNStackController.m
  36. 2
    2
      lib/ios/RNNStackPresenter.h
  37. 228
    0
      lib/ios/RNNStackPresenter.m
  38. 0
    82
      lib/ios/RNNTabBarPresenter.m
  39. 2
    2
      lib/ios/RNNTopTabsViewController.m
  40. 56
    56
      lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj
  41. 7
    7
      lib/ios/ReactNativeNavigationTests/RNNBasePresenterTest.m
  42. 16
    16
      lib/ios/ReactNativeNavigationTests/RNNCommandsHandlerTest.m
  43. 17
    17
      lib/ios/ReactNativeNavigationTests/RNNControllerFactoryTest.m
  44. 6
    6
      lib/ios/ReactNativeNavigationTests/RNNDotIndicatorPresenterTest.m
  45. 7
    7
      lib/ios/ReactNativeNavigationTests/RNNModalManagerTest.m
  46. 13
    13
      lib/ios/ReactNativeNavigationTests/RNNNavigationControllerTest.m
  47. 7
    7
      lib/ios/ReactNativeNavigationTests/RNNNavigationStackManagerTest.m
  48. 52
    52
      lib/ios/ReactNativeNavigationTests/RNNRootViewControllerTest.m
  49. 4
    4
      lib/ios/ReactNativeNavigationTests/RNNSideMenuControllerTest.m
  50. 15
    15
      lib/ios/ReactNativeNavigationTests/RNNStackPresenterTest.m
  51. 24
    24
      lib/ios/ReactNativeNavigationTests/RNNTabBarControllerTest.m
  52. 17
    17
      lib/ios/ReactNativeNavigationTests/RNNTabBarPresenterTest.m
  53. 2
    2
      lib/ios/ReactNativeNavigationTests/RNNTestRootViewCreator.h
  54. 52
    52
      lib/ios/ReactNativeNavigationTests/RNNViewControllerPresenterTest.m
  55. 5
    5
      lib/ios/ReactNativeNavigationTests/UITabBarController+RNNOptionsTest.m
  56. 21
    21
      lib/ios/ReactNativeNavigationTests/UIViewController+LayoutProtocolTest.m
  57. 14
    14
      lib/ios/ReactNativeNavigationTests/UIViewController+RNNOptionsTest.m
  58. 14
    14
      lib/ios/UINavigationController+RNNOptions.h
  59. 14
    14
      lib/ios/UINavigationController+RNNOptions.m
  60. 8
    8
      lib/ios/UITabBarController+RNNOptions.h
  61. 11
    11
      lib/ios/UITabBarController+RNNOptions.m
  62. 1
    1
      lib/ios/UIViewController+LayoutProtocol.h
  63. 5
    5
      lib/ios/UIViewController+LayoutProtocol.m
  64. 15
    19
      lib/ios/UIViewController+RNNOptions.h
  65. 16
    24
      lib/ios/UIViewController+RNNOptions.m

+ 1
- 1
lib/ios/RNNBasePresenter.h View File

26
 
26
 
27
 - (void)applyDotIndicator:(UIViewController *)child;
27
 - (void)applyDotIndicator:(UIViewController *)child;
28
 
28
 
29
-- (void)mergeOptions:(RNNNavigationOptions *)newOptions currentOptions:(RNNNavigationOptions *)currentOptions;
29
+- (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigationOptions *)resolvedOptions;
30
 
30
 
31
 - (void)renderComponents:(RNNNavigationOptions *)options perform:(RNNReactViewReadyCompletionBlock)readyBlock;
31
 - (void)renderComponents:(RNNNavigationOptions *)options perform:(RNNReactViewReadyCompletionBlock)readyBlock;
32
 
32
 

+ 23
- 23
lib/ios/RNNBasePresenter.m View File

85
     RNNNavigationOptions * withDefault = [options withDefault:_defaultOptions];
85
     RNNNavigationOptions * withDefault = [options withDefault:_defaultOptions];
86
 
86
 
87
     if (withDefault.bottomTab.badge.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
87
     if (withDefault.bottomTab.badge.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
88
-        [viewController rnn_setTabBarItemBadge:withDefault.bottomTab.badge.get];
88
+        [viewController setTabBarItemBadge:withDefault.bottomTab.badge.get];
89
     }
89
     }
90
 
90
 
91
     if (withDefault.bottomTab.badgeColor.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
91
     if (withDefault.bottomTab.badgeColor.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
92
-        [viewController rnn_setTabBarItemBadgeColor:withDefault.bottomTab.badgeColor.get];
92
+        [viewController setTabBarItemBadgeColor:withDefault.bottomTab.badgeColor.get];
93
     }
93
     }
94
 }
94
 }
95
 
95
 
96
-- (void)mergeOptions:(RNNNavigationOptions *)newOptions currentOptions:(RNNNavigationOptions *)currentOptions {
96
+- (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigationOptions *)resolvedOptions {
97
     UIViewController *viewController = self.boundViewController;
97
     UIViewController *viewController = self.boundViewController;
98
-    if (newOptions.bottomTab.badge.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
99
-        [viewController rnn_setTabBarItemBadge:newOptions.bottomTab.badge.get];
98
+    if (options.bottomTab.badge.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
99
+        [viewController setTabBarItemBadge:options.bottomTab.badge.get];
100
     }
100
     }
101
 
101
 
102
-    if (newOptions.bottomTab.badgeColor.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
103
-        [viewController rnn_setTabBarItemBadgeColor:newOptions.bottomTab.badgeColor.get];
102
+    if (options.bottomTab.badgeColor.hasValue && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
103
+        [viewController setTabBarItemBadgeColor:options.bottomTab.badgeColor.get];
104
     }
104
     }
105
 
105
 
106
-    if ([newOptions.bottomTab.dotIndicator hasValue] && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
107
-        [[self dotIndicatorPresenter] apply:viewController:newOptions.bottomTab.dotIndicator];
106
+    if ([options.bottomTab.dotIndicator hasValue] && [viewController.parentViewController isKindOfClass:[UITabBarController class]]) {
107
+        [[self dotIndicatorPresenter] apply:viewController:options.bottomTab.dotIndicator];
108
     }
108
     }
109
 
109
 
110
-    if (newOptions.bottomTab.text.hasValue) {
111
-        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [currentOptions overrideOptions:newOptions];
110
+    if (options.bottomTab.text.hasValue) {
111
+        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
112
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
112
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
113
         viewController.tabBarItem = tabItem;
113
         viewController.tabBarItem = tabItem;
114
     }
114
     }
115
 
115
 
116
-    if (newOptions.bottomTab.icon.hasValue) {
117
-        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [currentOptions overrideOptions:newOptions];
116
+    if (options.bottomTab.icon.hasValue) {
117
+        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
118
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
118
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
119
         viewController.tabBarItem = tabItem;
119
         viewController.tabBarItem = tabItem;
120
     }
120
     }
121
 
121
 
122
-    if (newOptions.bottomTab.selectedIcon.hasValue) {
123
-        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [currentOptions overrideOptions:newOptions];
122
+    if (options.bottomTab.selectedIcon.hasValue) {
123
+        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
124
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
124
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
125
         viewController.tabBarItem = tabItem;
125
         viewController.tabBarItem = tabItem;
126
     }
126
     }
127
 
127
 
128
-    if (newOptions.bottomTab.textColor.hasValue) {
129
-        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [currentOptions overrideOptions:newOptions];
128
+    if (options.bottomTab.textColor.hasValue) {
129
+        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
130
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
130
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
131
         viewController.tabBarItem = tabItem;
131
         viewController.tabBarItem = tabItem;
132
     }
132
     }
133
 
133
 
134
-    if (newOptions.bottomTab.selectedTextColor.hasValue) {
135
-        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [currentOptions overrideOptions:newOptions];
134
+    if (options.bottomTab.selectedTextColor.hasValue) {
135
+        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
136
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
136
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
137
         viewController.tabBarItem = tabItem;
137
         viewController.tabBarItem = tabItem;
138
     }
138
     }
139
 
139
 
140
-    if (newOptions.bottomTab.iconColor.hasValue) {
141
-        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [currentOptions overrideOptions:newOptions];
140
+    if (options.bottomTab.iconColor.hasValue) {
141
+        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
142
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
142
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
143
         viewController.tabBarItem = tabItem;
143
         viewController.tabBarItem = tabItem;
144
     }
144
     }
145
 
145
 
146
-    if (newOptions.bottomTab.selectedIconColor.hasValue) {
147
-        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [currentOptions overrideOptions:newOptions];
146
+    if (options.bottomTab.selectedIconColor.hasValue) {
147
+        RNNNavigationOptions *buttonsResolvedOptions = (RNNNavigationOptions *) [resolvedOptions overrideOptions:options];
148
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
148
         UITabBarItem *tabItem = [RNNTabBarItemCreator updateTabBarItem:viewController.tabBarItem bottomTabOptions:buttonsResolvedOptions.bottomTab];
149
         viewController.tabBarItem = tabItem;
149
         viewController.tabBarItem = tabItem;
150
     }
150
     }

lib/ios/RNNTabBarController.h → lib/ios/RNNBottomTabsController.h View File

1
 #import <UIKit/UIKit.h>
1
 #import <UIKit/UIKit.h>
2
 #import "RNNEventEmitter.h"
2
 #import "RNNEventEmitter.h"
3
-#import "RNNTabBarPresenter.h"
3
+#import "RNNBottomTabsPresenter.h"
4
 #import "UIViewController+LayoutProtocol.h"
4
 #import "UIViewController+LayoutProtocol.h"
5
 
5
 
6
-@interface RNNTabBarController : UITabBarController <RNNLayoutProtocol, UITabBarControllerDelegate>
6
+@interface RNNBottomTabsController : UITabBarController <RNNLayoutProtocol, UITabBarControllerDelegate>
7
 
7
 
8
 - (void)setSelectedIndexByComponentID:(NSString *)componentID;
8
 - (void)setSelectedIndexByComponentID:(NSString *)componentID;
9
 
9
 

lib/ios/RNNTabBarController.m → lib/ios/RNNBottomTabsController.m View File

1
-#import "RNNTabBarController.h"
1
+#import "RNNBottomTabsController.h"
2
 
2
 
3
-@implementation RNNTabBarController {
3
+@implementation RNNBottomTabsController {
4
 	NSUInteger _currentTabIndex;
4
 	NSUInteger _currentTabIndex;
5
 }
5
 }
6
 
6
 

lib/ios/RNNTabBarPresenter.h → lib/ios/RNNBottomTabsPresenter.h View File

1
 #import "RNNBasePresenter.h"
1
 #import "RNNBasePresenter.h"
2
 
2
 
3
-@interface RNNTabBarPresenter : RNNBasePresenter
3
+@interface RNNBottomTabsPresenter : RNNBasePresenter
4
 - (void)applyDotIndicator;
4
 - (void)applyDotIndicator;
5
 @end
5
 @end

+ 81
- 0
lib/ios/RNNBottomTabsPresenter.m View File

1
+#import "RNNBottomTabsPresenter.h"
2
+#import "UITabBarController+RNNOptions.h"
3
+#import "UIViewController+LayoutProtocol.h"
4
+#import "UIViewController+Utils.h"
5
+
6
+@implementation RNNBottomTabsPresenter
7
+
8
+- (void)applyOptionsOnInit:(RNNNavigationOptions *)options {
9
+    UITabBarController *bottomTabs = self.boundViewController;
10
+    RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
11
+    [bottomTabs setCurrentTabIndex:[withDefault.bottomTabs.currentTabIndex getWithDefaultValue:0]];
12
+}
13
+
14
+- (void)applyOptions:(RNNNavigationOptions *)options {
15
+    UITabBarController *bottomTabs = self.boundViewController;
16
+    RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
17
+
18
+    [bottomTabs setTabBarTestID:[withDefault.bottomTabs.testID getWithDefaultValue:nil]];
19
+    [bottomTabs setTabBarBackgroundColor:[withDefault.bottomTabs.backgroundColor getWithDefaultValue:nil]];
20
+    [bottomTabs setTabBarTranslucent:[withDefault.bottomTabs.translucent getWithDefaultValue:NO]];
21
+    [bottomTabs setTabBarHideShadow:[withDefault.bottomTabs.hideShadow getWithDefaultValue:NO]];
22
+    [bottomTabs setTabBarStyle:[RCTConvert UIBarStyle:[withDefault.bottomTabs.barStyle getWithDefaultValue:@"default"]]];
23
+    [bottomTabs setTabBarVisible:[withDefault.bottomTabs.visible getWithDefaultValue:YES] animated:[withDefault.bottomTabs.animate getWithDefaultValue:NO]];
24
+}
25
+
26
+- (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigationOptions *)currentOptions {
27
+    [super mergeOptions:options resolvedOptions:currentOptions];
28
+    UITabBarController *bottomTabs = self.boundViewController;
29
+
30
+    if (options.bottomTabs.currentTabIndex.hasValue) {
31
+        [bottomTabs setCurrentTabIndex:options.bottomTabs.currentTabIndex.get];
32
+        [options.bottomTabs.currentTabIndex consume];
33
+    }
34
+
35
+    if (options.bottomTabs.currentTabId.hasValue) {
36
+        [bottomTabs setCurrentTabID:options.bottomTabs.currentTabId.get];
37
+        [options.bottomTabs.currentTabId consume];
38
+    }
39
+
40
+    if (options.bottomTabs.testID.hasValue) {
41
+        [bottomTabs setTabBarTestID:options.bottomTabs.testID.get];
42
+    }
43
+
44
+    if (options.bottomTabs.backgroundColor.hasValue) {
45
+        [bottomTabs setTabBarBackgroundColor:options.bottomTabs.backgroundColor.get];
46
+    }
47
+
48
+    if (options.bottomTabs.barStyle.hasValue) {
49
+        [bottomTabs setTabBarStyle:[RCTConvert UIBarStyle:options.bottomTabs.barStyle.get]];
50
+    }
51
+
52
+    if (options.bottomTabs.translucent.hasValue) {
53
+        [bottomTabs setTabBarTranslucent:options.bottomTabs.translucent.get];
54
+    }
55
+
56
+    if (options.bottomTabs.hideShadow.hasValue) {
57
+        [bottomTabs setTabBarHideShadow:options.bottomTabs.hideShadow.get];
58
+    }
59
+
60
+    if (options.bottomTabs.visible.hasValue) {
61
+        if (options.bottomTabs.animate.hasValue) {
62
+            [bottomTabs setTabBarVisible:options.bottomTabs.visible.get animated:[options.bottomTabs.animate getWithDefaultValue:NO]];
63
+        } else {
64
+            [bottomTabs setTabBarVisible:options.bottomTabs.visible.get animated:NO];
65
+        }
66
+    }
67
+}
68
+
69
+- (void)viewDidLayoutSubviews {
70
+    dispatch_async(dispatch_get_main_queue(), ^{
71
+        [self applyDotIndicator];
72
+    });
73
+}
74
+
75
+- (void)applyDotIndicator {
76
+    [self.boundViewController forEachChild:^(UIViewController *child) {
77
+        [self applyDotIndicator:child];
78
+    }];
79
+}
80
+
81
+@end

+ 2
- 2
lib/ios/RNNBridgeManager.m View File

6
 #import "RNNEventEmitter.h"
6
 #import "RNNEventEmitter.h"
7
 #import "RNNSplashScreen.h"
7
 #import "RNNSplashScreen.h"
8
 #import "RNNBridgeModule.h"
8
 #import "RNNBridgeModule.h"
9
-#import "RNNRootViewCreator.h"
9
+#import "RNNComponentViewCreator.h"
10
 #import "RNNReactRootViewCreator.h"
10
 #import "RNNReactRootViewCreator.h"
11
 #import "RNNReactComponentRegistry.h"
11
 #import "RNNReactComponentRegistry.h"
12
 
12
 
82
 - (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge {
82
 - (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge {
83
 	RNNEventEmitter *eventEmitter = [[RNNEventEmitter alloc] init];
83
 	RNNEventEmitter *eventEmitter = [[RNNEventEmitter alloc] init];
84
 
84
 
85
-	id<RNNRootViewCreator> rootViewCreator = [[RNNReactRootViewCreator alloc] initWithBridge:bridge];
85
+	id<RNNComponentViewCreator> rootViewCreator = [[RNNReactRootViewCreator alloc] initWithBridge:bridge];
86
 	_componentRegistry = [[RNNReactComponentRegistry alloc] initWithCreator:rootViewCreator];
86
 	_componentRegistry = [[RNNReactComponentRegistry alloc] initWithCreator:rootViewCreator];
87
 	RNNControllerFactory *controllerFactory = [[RNNControllerFactory alloc] initWithRootViewCreator:rootViewCreator eventEmitter:eventEmitter store:_store componentRegistry:_componentRegistry andBridge:bridge];
87
 	RNNControllerFactory *controllerFactory = [[RNNControllerFactory alloc] initWithRootViewCreator:rootViewCreator eventEmitter:eventEmitter store:_store componentRegistry:_componentRegistry andBridge:bridge];
88
 	
88
 	

+ 8
- 8
lib/ios/RNNCommandsHandler.m View File

1
 #import "RNNCommandsHandler.h"
1
 #import "RNNCommandsHandler.h"
2
-#import "RNNRootViewController.h"
2
+#import "RNNComponentViewController.h"
3
 #import "RNNErrorHandler.h"
3
 #import "RNNErrorHandler.h"
4
 #import "RNNDefaultOptionsHelper.h"
4
 #import "RNNDefaultOptionsHelper.h"
5
 #import "UIViewController+RNNOptions.h"
5
 #import "UIViewController+RNNOptions.h"
85
 	
85
 	
86
 	UIViewController<RNNLayoutProtocol>* vc = [RNNLayoutManager findComponentForId:componentId];
86
 	UIViewController<RNNLayoutProtocol>* vc = [RNNLayoutManager findComponentForId:componentId];
87
 	RNNNavigationOptions* newOptions = [[RNNNavigationOptions alloc] initWithDict:mergeOptions];
87
 	RNNNavigationOptions* newOptions = [[RNNNavigationOptions alloc] initWithDict:mergeOptions];
88
-	if ([vc conformsToProtocol:@protocol(RNNLayoutProtocol)] || [vc isKindOfClass:[RNNRootViewController class]]) {
88
+	if ([vc conformsToProtocol:@protocol(RNNLayoutProtocol)] || [vc isKindOfClass:[RNNComponentViewController class]]) {
89
 		[CATransaction begin];
89
 		[CATransaction begin];
90
 		[CATransaction setCompletionBlock:completion];
90
 		[CATransaction setCompletionBlock:completion];
91
 		
91
 		
116
 	if ([[newVc.resolveOptions.preview.reactTag getWithDefaultValue:@(0)] floatValue] > 0) {
116
 	if ([[newVc.resolveOptions.preview.reactTag getWithDefaultValue:@(0)] floatValue] > 0) {
117
 		UIViewController* vc = [RNNLayoutManager findComponentForId:componentId];
117
 		UIViewController* vc = [RNNLayoutManager findComponentForId:componentId];
118
 		
118
 		
119
-		if([vc isKindOfClass:[RNNRootViewController class]]) {
120
-			RNNRootViewController* rootVc = (RNNRootViewController*)vc;
119
+		if([vc isKindOfClass:[RNNComponentViewController class]]) {
120
+			RNNComponentViewController* rootVc = (RNNComponentViewController*)vc;
121
 			rootVc.previewController = newVc;
121
 			rootVc.previewController = newVc;
122
 			[newVc renderTreeAndWait:NO perform:nil];
122
 			[newVc renderTreeAndWait:NO perform:nil];
123
 			
123
 			
124
 			rootVc.previewCallback = ^(UIViewController *vcc) {
124
 			rootVc.previewCallback = ^(UIViewController *vcc) {
125
-				RNNRootViewController* rvc  = (RNNRootViewController*)vcc;
125
+				RNNComponentViewController* rvc  = (RNNComponentViewController*)vcc;
126
 				[self->_eventEmitter sendOnPreviewCompleted:componentId previewComponentId:newVc.layoutInfo.componentId];
126
 				[self->_eventEmitter sendOnPreviewCompleted:componentId previewComponentId:newVc.layoutInfo.componentId];
127
 				if ([newVc.resolveOptions.preview.commit getWithDefaultValue:NO]) {
127
 				if ([newVc.resolveOptions.preview.commit getWithDefaultValue:NO]) {
128
 					[CATransaction begin];
128
 					[CATransaction begin];
190
 - (void)pop:(NSString*)componentId commandId:(NSString*)commandId mergeOptions:(NSDictionary*)mergeOptions completion:(RNNTransitionCompletionBlock)completion rejection:(RCTPromiseRejectBlock)rejection {
190
 - (void)pop:(NSString*)componentId commandId:(NSString*)commandId mergeOptions:(NSDictionary*)mergeOptions completion:(RNNTransitionCompletionBlock)completion rejection:(RCTPromiseRejectBlock)rejection {
191
 	[self assertReady];
191
 	[self assertReady];
192
 	
192
 	
193
-	RNNRootViewController *vc = (RNNRootViewController*)[RNNLayoutManager findComponentForId:componentId];
193
+	RNNComponentViewController *vc = (RNNComponentViewController*)[RNNLayoutManager findComponentForId:componentId];
194
 	RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:mergeOptions];
194
 	RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:mergeOptions];
195
 	[vc overrideOptions:options];
195
 	[vc overrideOptions:options];
196
 	
196
 	
216
 
216
 
217
 - (void)popTo:(NSString*)componentId commandId:(NSString*)commandId mergeOptions:(NSDictionary *)mergeOptions completion:(RNNTransitionCompletionBlock)completion rejection:(RCTPromiseRejectBlock)rejection {
217
 - (void)popTo:(NSString*)componentId commandId:(NSString*)commandId mergeOptions:(NSDictionary *)mergeOptions completion:(RNNTransitionCompletionBlock)completion rejection:(RCTPromiseRejectBlock)rejection {
218
 	[self assertReady];
218
 	[self assertReady];
219
-	RNNRootViewController *vc = (RNNRootViewController*)[RNNLayoutManager findComponentForId:componentId];
219
+	RNNComponentViewController *vc = (RNNComponentViewController*)[RNNLayoutManager findComponentForId:componentId];
220
 	RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:mergeOptions];
220
 	RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:mergeOptions];
221
 	[vc overrideOptions:options];
221
 	[vc overrideOptions:options];
222
 	
222
 	
228
 
228
 
229
 - (void)popToRoot:(NSString*)componentId commandId:(NSString*)commandId mergeOptions:(NSDictionary *)mergeOptions completion:(RNNTransitionCompletionBlock)completion rejection:(RCTPromiseRejectBlock)rejection {
229
 - (void)popToRoot:(NSString*)componentId commandId:(NSString*)commandId mergeOptions:(NSDictionary *)mergeOptions completion:(RNNTransitionCompletionBlock)completion rejection:(RCTPromiseRejectBlock)rejection {
230
 	[self assertReady];
230
 	[self assertReady];
231
-	RNNRootViewController *vc = (RNNRootViewController*)[RNNLayoutManager findComponentForId:componentId];
231
+	RNNComponentViewController *vc = (RNNComponentViewController*)[RNNLayoutManager findComponentForId:componentId];
232
 	RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:mergeOptions];
232
 	RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:mergeOptions];
233
 	[vc overrideOptions:options];
233
 	[vc overrideOptions:options];
234
 	
234
 	

lib/ios/RNNViewControllerPresenter.h → lib/ios/RNNComponentPresenter.h View File

2
 #import "RNNNavigationButtons.h"
2
 #import "RNNNavigationButtons.h"
3
 #import "RNNReactComponentRegistry.h"
3
 #import "RNNReactComponentRegistry.h"
4
 
4
 
5
-@interface RNNViewControllerPresenter : RNNBasePresenter
5
+@interface RNNComponentPresenter : RNNBasePresenter
6
 
6
 
7
 - (instancetype)initWithComponentRegistry:(RNNReactComponentRegistry *)componentRegistry:(RNNNavigationOptions *)defaultOptions;
7
 - (instancetype)initWithComponentRegistry:(RNNReactComponentRegistry *)componentRegistry:(RNNNavigationOptions *)defaultOptions;
8
 
8
 

lib/ios/RNNViewControllerPresenter.m → lib/ios/RNNComponentPresenter.m View File

1
-#import "RNNViewControllerPresenter.h"
1
+#import "RNNComponentPresenter.h"
2
 #import "UIViewController+RNNOptions.h"
2
 #import "UIViewController+RNNOptions.h"
3
 #import "UITabBarController+RNNOptions.h"
3
 #import "UITabBarController+RNNOptions.h"
4
 #import "RCTConvert+Modal.h"
4
 #import "RCTConvert+Modal.h"
5
 #import "RNNTitleViewHelper.h"
5
 #import "RNNTitleViewHelper.h"
6
 #import "UIViewController+LayoutProtocol.h"
6
 #import "UIViewController+LayoutProtocol.h"
7
 
7
 
8
-@interface RNNViewControllerPresenter() {
8
+@interface RNNComponentPresenter() {
9
 	RNNReactView* _customTitleView;
9
 	RNNReactView* _customTitleView;
10
 	RNNTitleViewHelper* _titleViewHelper;
10
 	RNNTitleViewHelper* _titleViewHelper;
11
 	RNNReactComponentRegistry* _componentRegistry;
11
 	RNNReactComponentRegistry* _componentRegistry;
13
 
13
 
14
 @end
14
 @end
15
 
15
 
16
-@implementation RNNViewControllerPresenter
16
+@implementation RNNComponentPresenter
17
 
17
 
18
 - (instancetype)initWithComponentRegistry:(RNNReactComponentRegistry *)componentRegistry:(RNNNavigationOptions *)defaultOptions {
18
 - (instancetype)initWithComponentRegistry:(RNNReactComponentRegistry *)componentRegistry:(RNNNavigationOptions *)defaultOptions {
19
 	self = [self initWithDefaultOptions:defaultOptions];
19
 	self = [self initWithDefaultOptions:defaultOptions];
30
 	[super applyOptionsOnWillMoveToParentViewController:options];
30
 	[super applyOptionsOnWillMoveToParentViewController:options];
31
 	UIViewController* viewController = self.boundViewController;
31
 	UIViewController* viewController = self.boundViewController;
32
 	RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
32
 	RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
33
-	[viewController rnn_setBackButtonIcon:[withDefault.topBar.backButton.icon getWithDefaultValue:nil] withColor:[withDefault.topBar.backButton.color getWithDefaultValue:nil] title:[withDefault.topBar.backButton.showTitle getWithDefaultValue:YES] ? [withDefault.topBar.backButton.title getWithDefaultValue:nil] : @""];
33
+	[viewController setBackButtonIcon:[withDefault.topBar.backButton.icon getWithDefaultValue:nil] withColor:[withDefault.topBar.backButton.color getWithDefaultValue:nil] title:[withDefault.topBar.backButton.showTitle getWithDefaultValue:YES] ? [withDefault.topBar.backButton.title getWithDefaultValue:nil] : @""];
34
 }
34
 }
35
 
35
 
36
 - (void)applyOptions:(RNNNavigationOptions *)options {
36
 - (void)applyOptions:(RNNNavigationOptions *)options {
38
 	
38
 	
39
 	UIViewController* viewController = self.boundViewController;
39
 	UIViewController* viewController = self.boundViewController;
40
 	RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
40
 	RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
41
-	[viewController rnn_setBackgroundImage:[withDefault.backgroundImage getWithDefaultValue:nil]];
42
-	[viewController rnn_setNavigationItemTitle:[withDefault.topBar.title.text getWithDefaultValue:nil]];
43
-	[viewController rnn_setTopBarPrefersLargeTitle:[withDefault.topBar.largeTitle.visible getWithDefaultValue:NO]];
44
-	[viewController rnn_setTabBarItemBadgeColor:[withDefault.bottomTab.badgeColor getWithDefaultValue:nil]];
45
-	[viewController rnn_setStatusBarBlur:[withDefault.statusBar.blur getWithDefaultValue:NO]];
46
-	[viewController rnn_setStatusBarStyle:[withDefault.statusBar.style getWithDefaultValue:@"default"] animated:[withDefault.statusBar.animate getWithDefaultValue:YES]];
47
-	[viewController rnn_setBackButtonVisible:[withDefault.topBar.backButton.visible getWithDefaultValue:YES]];
48
-	[viewController rnn_setInterceptTouchOutside:[withDefault.overlay.interceptTouchOutside getWithDefaultValue:YES]];
41
+	[viewController setBackgroundImage:[withDefault.backgroundImage getWithDefaultValue:nil]];
42
+	[viewController setNavigationItemTitle:[withDefault.topBar.title.text getWithDefaultValue:nil]];
43
+	[viewController setTopBarPrefersLargeTitle:[withDefault.topBar.largeTitle.visible getWithDefaultValue:NO]];
44
+	[viewController setTabBarItemBadgeColor:[withDefault.bottomTab.badgeColor getWithDefaultValue:nil]];
45
+	[viewController setStatusBarBlur:[withDefault.statusBar.blur getWithDefaultValue:NO]];
46
+	[viewController setStatusBarStyle:[withDefault.statusBar.style getWithDefaultValue:@"default"] animated:[withDefault.statusBar.animate getWithDefaultValue:YES]];
47
+	[viewController setBackButtonVisible:[withDefault.topBar.backButton.visible getWithDefaultValue:YES]];
48
+	[viewController setInterceptTouchOutside:[withDefault.overlay.interceptTouchOutside getWithDefaultValue:YES]];
49
 	
49
 	
50
 	if (withDefault.layout.backgroundColor.hasValue) {
50
 	if (withDefault.layout.backgroundColor.hasValue) {
51
-		[viewController rnn_setBackgroundColor:withDefault.layout.backgroundColor.get];
51
+		[viewController setBackgroundColor:withDefault.layout.backgroundColor.get];
52
 	}
52
 	}
53
 	
53
 	
54
 	if (withDefault.topBar.searchBar.hasValue) {
54
 	if (withDefault.topBar.searchBar.hasValue) {
56
 		if (withDefault.topBar.hideNavBarOnFocusSearchBar.hasValue) {
56
 		if (withDefault.topBar.hideNavBarOnFocusSearchBar.hasValue) {
57
 			hideNavBarOnFocusSearchBar = withDefault.topBar.hideNavBarOnFocusSearchBar.get;
57
 			hideNavBarOnFocusSearchBar = withDefault.topBar.hideNavBarOnFocusSearchBar.get;
58
 		}
58
 		}
59
-		[viewController rnn_setSearchBarWithPlaceholder:[withDefault.topBar.searchBarPlaceholder getWithDefaultValue:@""] hideNavBarOnFocusSearchBar: hideNavBarOnFocusSearchBar];
59
+		[viewController setSearchBarWithPlaceholder:[withDefault.topBar.searchBarPlaceholder getWithDefaultValue:@""] hideNavBarOnFocusSearchBar:hideNavBarOnFocusSearchBar];
60
 	}
60
 	}
61
 	
61
 	
62
 	[self setTitleViewWithSubtitle:withDefault];
62
 	[self setTitleViewWithSubtitle:withDefault];
67
 	
67
 	
68
 	UIViewController* viewController = self.boundViewController;
68
 	UIViewController* viewController = self.boundViewController;
69
 	RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
69
 	RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
70
-	[viewController rnn_setModalPresentationStyle:[RCTConvert UIModalPresentationStyle:[withDefault.modalPresentationStyle getWithDefaultValue:@"fullScreen"]]];
71
-	[viewController rnn_setModalTransitionStyle:[RCTConvert UIModalTransitionStyle:[withDefault.modalTransitionStyle getWithDefaultValue:@"coverVertical"]]];
72
-	[viewController rnn_setDrawBehindTopBar:[withDefault.topBar.drawBehind getWithDefaultValue:NO]];
73
-	[viewController rnn_setDrawBehindTabBar:[withDefault.bottomTabs.drawBehind getWithDefaultValue:NO] || ![withDefault.bottomTabs.visible getWithDefaultValue:YES]];
70
+	[viewController setModalPresentationStyle:[RCTConvert UIModalPresentationStyle:[withDefault.modalPresentationStyle getWithDefaultValue:@"fullScreen"]]];
71
+	[viewController setModalTransitionStyle:[RCTConvert UIModalTransitionStyle:[withDefault.modalTransitionStyle getWithDefaultValue:@"coverVertical"]]];
72
+	[viewController setDrawBehindTopBar:[withDefault.topBar.drawBehind getWithDefaultValue:NO]];
73
+	[viewController setDrawBehindTabBar:[withDefault.bottomTabs.drawBehind getWithDefaultValue:NO] || ![withDefault.bottomTabs.visible getWithDefaultValue:YES]];
74
 	
74
 	
75
 	if ((withDefault.topBar.leftButtons || withDefault.topBar.rightButtons)) {
75
 	if ((withDefault.topBar.leftButtons || withDefault.topBar.rightButtons)) {
76
 		[_navigationButtons applyLeftButtons:withDefault.topBar.leftButtons rightButtons:withDefault.topBar.rightButtons defaultLeftButtonStyle:withDefault.topBar.leftButtonStyle defaultRightButtonStyle:withDefault.topBar.rightButtonStyle];
76
 		[_navigationButtons applyLeftButtons:withDefault.topBar.leftButtons rightButtons:withDefault.topBar.rightButtons defaultLeftButtonStyle:withDefault.topBar.leftButtonStyle defaultRightButtonStyle:withDefault.topBar.rightButtonStyle];
77
 	}
77
 	}
78
 }
78
 }
79
 
79
 
80
-- (void)mergeOptions:(RNNNavigationOptions *)newOptions currentOptions:(RNNNavigationOptions *)currentOptions {
81
-	[super mergeOptions:newOptions currentOptions:currentOptions];
82
-	RNNNavigationOptions * withDefault	= (RNNNavigationOptions *) [[currentOptions overrideOptions:newOptions] withDefault:[self defaultOptions]];
80
+- (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigationOptions *)currentOptions {
81
+    [super mergeOptions:options resolvedOptions:currentOptions];
82
+	RNNNavigationOptions * withDefault	= (RNNNavigationOptions *) [[currentOptions overrideOptions:options] withDefault:[self defaultOptions]];
83
 
83
 
84
 	UIViewController* viewController = self.boundViewController;
84
 	UIViewController* viewController = self.boundViewController;
85
 	
85
 	
86
-	if (newOptions.backgroundImage.hasValue) {
87
-		[viewController rnn_setBackgroundImage:newOptions.backgroundImage.get];
86
+	if (options.backgroundImage.hasValue) {
87
+		[viewController setBackgroundImage:options.backgroundImage.get];
88
 	}
88
 	}
89
 	
89
 	
90
-	if (newOptions.modalPresentationStyle.hasValue) {
91
-		[viewController rnn_setModalPresentationStyle:[RCTConvert UIModalPresentationStyle:newOptions.modalPresentationStyle.get]];
90
+	if (options.modalPresentationStyle.hasValue) {
91
+		[viewController setModalPresentationStyle:[RCTConvert UIModalPresentationStyle:options.modalPresentationStyle.get]];
92
 	}
92
 	}
93
 	
93
 	
94
-	if (newOptions.modalTransitionStyle.hasValue) {
95
-		[viewController rnn_setModalTransitionStyle:[RCTConvert UIModalTransitionStyle:newOptions.modalTransitionStyle.get]];
94
+	if (options.modalTransitionStyle.hasValue) {
95
+		[viewController setModalTransitionStyle:[RCTConvert UIModalTransitionStyle:options.modalTransitionStyle.get]];
96
 	}
96
 	}
97
 	
97
 	
98
-	if (newOptions.topBar.searchBar.hasValue) {
98
+	if (options.topBar.searchBar.hasValue) {
99
 		BOOL hideNavBarOnFocusSearchBar = YES;
99
 		BOOL hideNavBarOnFocusSearchBar = YES;
100
-		if (newOptions.topBar.hideNavBarOnFocusSearchBar.hasValue) {
101
-			hideNavBarOnFocusSearchBar = newOptions.topBar.hideNavBarOnFocusSearchBar.get;
100
+		if (options.topBar.hideNavBarOnFocusSearchBar.hasValue) {
101
+			hideNavBarOnFocusSearchBar = options.topBar.hideNavBarOnFocusSearchBar.get;
102
 		}
102
 		}
103
-		[viewController rnn_setSearchBarWithPlaceholder:[newOptions.topBar.searchBarPlaceholder getWithDefaultValue:@""] hideNavBarOnFocusSearchBar:hideNavBarOnFocusSearchBar];
103
+		[viewController setSearchBarWithPlaceholder:[options.topBar.searchBarPlaceholder getWithDefaultValue:@""] hideNavBarOnFocusSearchBar:hideNavBarOnFocusSearchBar];
104
 	}
104
 	}
105
 	
105
 	
106
-	if (newOptions.topBar.drawBehind.hasValue) {
107
-		[viewController rnn_setDrawBehindTopBar:newOptions.topBar.drawBehind.get];
106
+	if (options.topBar.drawBehind.hasValue) {
107
+		[viewController setDrawBehindTopBar:options.topBar.drawBehind.get];
108
 	}
108
 	}
109
 	
109
 	
110
-	if (newOptions.topBar.title.text.hasValue) {
111
-		[viewController rnn_setNavigationItemTitle:newOptions.topBar.title.text.get];
110
+	if (options.topBar.title.text.hasValue) {
111
+		[viewController setNavigationItemTitle:options.topBar.title.text.get];
112
 	}
112
 	}
113
 	
113
 	
114
-	if (newOptions.topBar.largeTitle.visible.hasValue) {
115
-		[viewController rnn_setTopBarPrefersLargeTitle:newOptions.topBar.largeTitle.visible.get];
114
+	if (options.topBar.largeTitle.visible.hasValue) {
115
+		[viewController setTopBarPrefersLargeTitle:options.topBar.largeTitle.visible.get];
116
 	}
116
 	}
117
 	
117
 	
118
-	if (newOptions.bottomTabs.drawBehind.hasValue) {
119
-		[viewController rnn_setDrawBehindTabBar:newOptions.bottomTabs.drawBehind.get];
118
+	if (options.bottomTabs.drawBehind.hasValue) {
119
+		[viewController setDrawBehindTabBar:options.bottomTabs.drawBehind.get];
120
 	}
120
 	}
121
 	
121
 	
122
-	if (newOptions.bottomTab.badgeColor.hasValue) {
123
-		[viewController rnn_setTabBarItemBadgeColor:newOptions.bottomTab.badgeColor.get];
122
+	if (options.bottomTab.badgeColor.hasValue) {
123
+		[viewController setTabBarItemBadgeColor:options.bottomTab.badgeColor.get];
124
 	}
124
 	}
125
 	
125
 	
126
-	if (newOptions.layout.backgroundColor.hasValue) {
127
-		[viewController rnn_setBackgroundColor:newOptions.layout.backgroundColor.get];
126
+	if (options.layout.backgroundColor.hasValue) {
127
+		[viewController setBackgroundColor:options.layout.backgroundColor.get];
128
 	}
128
 	}
129
 	
129
 	
130
-	if (newOptions.bottomTab.visible.hasValue) {
131
-		[viewController.tabBarController rnn_setCurrentTabIndex:[viewController.tabBarController.viewControllers indexOfObject:viewController]];
130
+	if (options.bottomTab.visible.hasValue) {
131
+		[viewController.tabBarController setCurrentTabIndex:[viewController.tabBarController.viewControllers indexOfObject:viewController]];
132
 	}
132
 	}
133
 	
133
 	
134
-	if (newOptions.statusBar.blur.hasValue) {
135
-		[viewController rnn_setStatusBarBlur:newOptions.statusBar.blur.get];
134
+	if (options.statusBar.blur.hasValue) {
135
+		[viewController setStatusBarBlur:options.statusBar.blur.get];
136
 	}
136
 	}
137
 	
137
 	
138
-	if (newOptions.statusBar.style.hasValue) {
139
-		[viewController rnn_setStatusBarStyle:newOptions.statusBar.style.get animated:[withDefault.statusBar.animate getWithDefaultValue:YES]];
138
+	if (options.statusBar.style.hasValue) {
139
+		[viewController setStatusBarStyle:options.statusBar.style.get animated:[withDefault.statusBar.animate getWithDefaultValue:YES]];
140
 	}
140
 	}
141
 	
141
 	
142
-	if (newOptions.topBar.backButton.visible.hasValue) {
143
-		[viewController rnn_setBackButtonVisible:newOptions.topBar.backButton.visible.get];
142
+	if (options.topBar.backButton.visible.hasValue) {
143
+		[viewController setBackButtonVisible:options.topBar.backButton.visible.get];
144
 	}
144
 	}
145
 	
145
 	
146
-	if (newOptions.topBar.leftButtons || newOptions.topBar.rightButtons) {
147
-		[_navigationButtons applyLeftButtons:newOptions.topBar.leftButtons rightButtons:newOptions.topBar.rightButtons defaultLeftButtonStyle:withDefault.topBar.leftButtonStyle defaultRightButtonStyle:withDefault.topBar.rightButtonStyle];
146
+	if (options.topBar.leftButtons || options.topBar.rightButtons) {
147
+		[_navigationButtons applyLeftButtons:options.topBar.leftButtons rightButtons:options.topBar.rightButtons defaultLeftButtonStyle:withDefault.topBar.leftButtonStyle defaultRightButtonStyle:withDefault.topBar.rightButtonStyle];
148
 	}
148
 	}
149
 	
149
 	
150
 
150
 
151
-	if (newOptions.overlay.interceptTouchOutside.hasValue) {
151
+	if (options.overlay.interceptTouchOutside.hasValue) {
152
 		RCTRootView* rootView = (RCTRootView*)viewController.view;
152
 		RCTRootView* rootView = (RCTRootView*)viewController.view;
153
-		rootView.passThroughTouches = !newOptions.overlay.interceptTouchOutside.get;
153
+		rootView.passThroughTouches = !options.overlay.interceptTouchOutside.get;
154
 	}
154
 	}
155
 
155
 
156
 	[self setTitleViewWithSubtitle:withDefault];
156
 	[self setTitleViewWithSubtitle:withDefault];
157
 
157
 
158
-	if (newOptions.topBar.title.component.name.hasValue) {
159
-		[self setCustomNavigationTitleView:newOptions perform:nil];
158
+	if (options.topBar.title.component.name.hasValue) {
159
+		[self setCustomNavigationTitleView:options perform:nil];
160
 	} else {
160
 	} else {
161
 		[_customTitleView removeFromSuperview];
161
 		[_customTitleView removeFromSuperview];
162
 		_customTitleView = nil;
162
 		_customTitleView = nil;
163
 	}
163
 	}
164
 
164
 
165
-	if (newOptions.topBar.backButton.hasValue) {
165
+	if (options.topBar.backButton.hasValue) {
166
 		UIViewController *lastViewControllerInStack = viewController.navigationController.viewControllers.count > 1 ? viewController.navigationController.viewControllers[viewController.navigationController.viewControllers.count - 2] : viewController.navigationController.topViewController;
166
 		UIViewController *lastViewControllerInStack = viewController.navigationController.viewControllers.count > 1 ? viewController.navigationController.viewControllers[viewController.navigationController.viewControllers.count - 2] : viewController.navigationController.topViewController;
167
-	    RNNNavigationOptions * resolvedOptions	= (RNNNavigationOptions *) [[currentOptions overrideOptions:newOptions] withDefault:[self defaultOptions]];
167
+	    RNNNavigationOptions * resolvedOptions	= (RNNNavigationOptions *) [[currentOptions overrideOptions:options] withDefault:[self defaultOptions]];
168
 		[lastViewControllerInStack applyBackButton:resolvedOptions.topBar.backButton];
168
 		[lastViewControllerInStack applyBackButton:resolvedOptions.topBar.backButton];
169
 	}
169
 	}
170
 }
170
 }

lib/ios/RNNRootViewController.h → lib/ios/RNNComponentViewController.h View File

1
 #import "RNNLayoutNode.h"
1
 #import "RNNLayoutNode.h"
2
-#import "RNNRootViewCreator.h"
2
+#import "RNNComponentViewCreator.h"
3
 #import "RNNEventEmitter.h"
3
 #import "RNNEventEmitter.h"
4
 #import "RNNNavigationOptions.h"
4
 #import "RNNNavigationOptions.h"
5
 #import "RNNAnimator.h"
5
 #import "RNNAnimator.h"
6
 #import "RNNUIBarButtonItem.h"
6
 #import "RNNUIBarButtonItem.h"
7
 #import "RNNLayoutInfo.h"
7
 #import "RNNLayoutInfo.h"
8
 #import "RNNLayoutProtocol.h"
8
 #import "RNNLayoutProtocol.h"
9
-#import "RNNViewControllerPresenter.h"
9
+#import "RNNComponentPresenter.h"
10
 
10
 
11
 typedef void (^PreviewCallback)(UIViewController *vc);
11
 typedef void (^PreviewCallback)(UIViewController *vc);
12
 
12
 
13
-@interface RNNRootViewController : UIViewController	<RNNLayoutProtocol, UIViewControllerPreviewingDelegate, UISearchResultsUpdating, UISearchBarDelegate, UINavigationControllerDelegate, UISplitViewControllerDelegate>
13
+@interface RNNComponentViewController : UIViewController	<RNNLayoutProtocol, UIViewControllerPreviewingDelegate, UISearchResultsUpdating, UISearchBarDelegate, UINavigationControllerDelegate, UISplitViewControllerDelegate>
14
 
14
 
15
 @property (nonatomic, strong) RNNEventEmitter *eventEmitter;
15
 @property (nonatomic, strong) RNNEventEmitter *eventEmitter;
16
 @property (nonatomic, retain) RNNLayoutInfo* layoutInfo;
16
 @property (nonatomic, retain) RNNLayoutInfo* layoutInfo;
17
-@property (nonatomic, strong) RNNViewControllerPresenter* presenter;
17
+@property (nonatomic, strong) RNNComponentPresenter* presenter;
18
 @property (nonatomic, strong) RNNNavigationOptions* options;
18
 @property (nonatomic, strong) RNNNavigationOptions* options;
19
 @property (nonatomic, strong) RNNNavigationOptions* defaultOptions;
19
 @property (nonatomic, strong) RNNNavigationOptions* defaultOptions;
20
 
20
 
23
 @property (nonatomic, copy) PreviewCallback previewCallback;
23
 @property (nonatomic, copy) PreviewCallback previewCallback;
24
 
24
 
25
 - (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo
25
 - (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo
26
-				   rootViewCreator:(id<RNNRootViewCreator>)creator
26
+				   rootViewCreator:(id<RNNComponentViewCreator>)creator
27
 					  eventEmitter:(RNNEventEmitter*)eventEmitter
27
 					  eventEmitter:(RNNEventEmitter*)eventEmitter
28
-						 presenter:(RNNViewControllerPresenter *)presenter
28
+						 presenter:(RNNComponentPresenter *)presenter
29
 						   options:(RNNNavigationOptions *)options
29
 						   options:(RNNNavigationOptions *)options
30
 					defaultOptions:(RNNNavigationOptions *)defaultOptions;
30
 					defaultOptions:(RNNNavigationOptions *)defaultOptions;
31
 
31
 
32
 - (instancetype)initExternalComponentWithLayoutInfo:(RNNLayoutInfo *)layoutInfo
32
 - (instancetype)initExternalComponentWithLayoutInfo:(RNNLayoutInfo *)layoutInfo
33
 									   eventEmitter:(RNNEventEmitter*)eventEmitter
33
 									   eventEmitter:(RNNEventEmitter*)eventEmitter
34
-										  presenter:(RNNViewControllerPresenter *)presenter
34
+										  presenter:(RNNComponentPresenter *)presenter
35
 											options:(RNNNavigationOptions *)options
35
 											options:(RNNNavigationOptions *)options
36
 									 defaultOptions:(RNNNavigationOptions *)defaultOptions;
36
 									 defaultOptions:(RNNNavigationOptions *)defaultOptions;
37
 
37
 

lib/ios/RNNRootViewController.m → lib/ios/RNNComponentViewController.m View File

1
-#import "RNNRootViewController.h"
1
+#import "RNNComponentViewController.h"
2
 #import "RNNAnimationsTransitionDelegate.h"
2
 #import "RNNAnimationsTransitionDelegate.h"
3
 #import "UIViewController+LayoutProtocol.h"
3
 #import "UIViewController+LayoutProtocol.h"
4
 
4
 
5
-@implementation RNNRootViewController
5
+@implementation RNNComponentViewController
6
 
6
 
7
 @synthesize previewCallback;
7
 @synthesize previewCallback;
8
 
8
 
9
-- (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo rootViewCreator:(id<RNNRootViewCreator>)creator eventEmitter:(RNNEventEmitter *)eventEmitter presenter:(RNNViewControllerPresenter *)presenter options:(RNNNavigationOptions *)options defaultOptions:(RNNNavigationOptions *)defaultOptions {
9
+- (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo rootViewCreator:(id<RNNComponentViewCreator>)creator eventEmitter:(RNNEventEmitter *)eventEmitter presenter:(RNNComponentPresenter *)presenter options:(RNNNavigationOptions *)options defaultOptions:(RNNNavigationOptions *)defaultOptions {
10
 	self = [super initWithLayoutInfo:layoutInfo creator:creator options:options defaultOptions:defaultOptions presenter:presenter eventEmitter:eventEmitter childViewControllers:nil];
10
 	self = [super initWithLayoutInfo:layoutInfo creator:creator options:options defaultOptions:defaultOptions presenter:presenter eventEmitter:eventEmitter childViewControllers:nil];
11
 	
11
 	
12
 	self.animator = [[RNNAnimator alloc] initWithTransitionOptions:self.resolveOptions.customTransition];
12
 	self.animator = [[RNNAnimator alloc] initWithTransitionOptions:self.resolveOptions.customTransition];
16
 	return self;
16
 	return self;
17
 }
17
 }
18
 
18
 
19
-- (instancetype)initExternalComponentWithLayoutInfo:(RNNLayoutInfo *)layoutInfo eventEmitter:(RNNEventEmitter *)eventEmitter presenter:(RNNViewControllerPresenter *)presenter options:(RNNNavigationOptions *)options defaultOptions:(RNNNavigationOptions *)defaultOptions {
19
+- (instancetype)initExternalComponentWithLayoutInfo:(RNNLayoutInfo *)layoutInfo eventEmitter:(RNNEventEmitter *)eventEmitter presenter:(RNNComponentPresenter *)presenter options:(RNNNavigationOptions *)options defaultOptions:(RNNNavigationOptions *)defaultOptions {
20
 	self = [self initWithLayoutInfo:layoutInfo rootViewCreator:nil eventEmitter:eventEmitter presenter:presenter options:options defaultOptions:defaultOptions];
20
 	self = [self initWithLayoutInfo:layoutInfo rootViewCreator:nil eventEmitter:eventEmitter presenter:presenter options:options defaultOptions:defaultOptions];
21
 	return self;
21
 	return self;
22
 }
22
 }
31
 	[_presenter setDefaultOptions:defaultOptions];
31
 	[_presenter setDefaultOptions:defaultOptions];
32
 }
32
 }
33
 
33
 
34
-- (void)mergeOptions:(RNNNavigationOptions *)options {
35
-	[_presenter mergeOptions:options currentOptions:self.options];
36
-	[self.parentViewController mergeChildOptions:options];
37
-}
38
-
39
 - (void)overrideOptions:(RNNNavigationOptions *)options {
34
 - (void)overrideOptions:(RNNNavigationOptions *)options {
40
 	[self.options overrideOptions:options];
35
 	[self.options overrideOptions:options];
41
 }
36
 }
124
 }
119
 }
125
 
120
 
126
 - (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
121
 - (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
127
-	RNNRootViewController* vc =  (RNNRootViewController*)viewController;
122
+	RNNComponentViewController* vc =  (RNNComponentViewController*)viewController;
128
 	if (![[vc.self.resolveOptions.topBar.backButton.transition getWithDefaultValue:@""] isEqualToString:@"custom"]){
123
 	if (![[vc.self.resolveOptions.topBar.backButton.transition getWithDefaultValue:@""] isEqualToString:@"custom"]){
129
 		navigationController.delegate = nil;
124
 		navigationController.delegate = nil;
130
 	}
125
 	}

lib/ios/RNNRootViewCreator.h → lib/ios/RNNComponentViewCreator.h View File

3
 #import "RNNComponentOptions.h"
3
 #import "RNNComponentOptions.h"
4
 #import "RNNReactView.h"
4
 #import "RNNReactView.h"
5
 
5
 
6
-@protocol RNNRootViewCreator
6
+@protocol RNNComponentViewCreator
7
 
7
 
8
 - (RNNReactView*)createRootView:(NSString*)name rootViewId:(NSString*)rootViewId availableSize:(CGSize)availableSize reactViewReadyBlock:(RNNReactViewReadyCompletionBlock)reactViewReadyBlock;
8
 - (RNNReactView*)createRootView:(NSString*)name rootViewId:(NSString*)rootViewId availableSize:(CGSize)availableSize reactViewReadyBlock:(RNNReactViewReadyCompletionBlock)reactViewReadyBlock;
9
 
9
 

+ 2
- 2
lib/ios/RNNControllerFactory.h View File

1
 
1
 
2
 #import <Foundation/Foundation.h>
2
 #import <Foundation/Foundation.h>
3
 #import <UIKit/UIKit.h>
3
 #import <UIKit/UIKit.h>
4
-#import "RNNRootViewCreator.h"
4
+#import "RNNComponentViewCreator.h"
5
 #import "RNNExternalComponentStore.h"
5
 #import "RNNExternalComponentStore.h"
6
 #import "RNNEventEmitter.h"
6
 #import "RNNEventEmitter.h"
7
 #import "RNNReactComponentRegistry.h"
7
 #import "RNNReactComponentRegistry.h"
9
 
9
 
10
 @interface RNNControllerFactory : NSObject
10
 @interface RNNControllerFactory : NSObject
11
 
11
 
12
--(instancetype)initWithRootViewCreator:(id <RNNRootViewCreator>)creator
12
+-(instancetype)initWithRootViewCreator:(id <RNNComponentViewCreator>)creator
13
 						  eventEmitter:(RNNEventEmitter*)eventEmitter
13
 						  eventEmitter:(RNNEventEmitter*)eventEmitter
14
 								 store:(RNNExternalComponentStore *)store
14
 								 store:(RNNExternalComponentStore *)store
15
 					  componentRegistry:(RNNReactComponentRegistry *)componentRegistry
15
 					  componentRegistry:(RNNReactComponentRegistry *)componentRegistry

+ 21
- 25
lib/ios/RNNControllerFactory.m View File

1
 #import "RNNControllerFactory.h"
1
 #import "RNNControllerFactory.h"
2
 #import "RNNSplitViewController.h"
2
 #import "RNNSplitViewController.h"
3
 #import "RNNSideMenuController.h"
3
 #import "RNNSideMenuController.h"
4
-#import "RNNNavigationController.h"
5
-#import "RNNTabBarController.h"
4
+#import "RNNStackController.h"
5
+#import "RNNBottomTabsController.h"
6
 #import "RNNTopTabsViewController.h"
6
 #import "RNNTopTabsViewController.h"
7
-#import "RNNRootViewController.h"
7
+#import "RNNComponentViewController.h"
8
 
8
 
9
 @implementation RNNControllerFactory {
9
 @implementation RNNControllerFactory {
10
-	id<RNNRootViewCreator> _creator;
10
+	id<RNNComponentViewCreator> _creator;
11
 	RNNExternalComponentStore *_store;
11
 	RNNExternalComponentStore *_store;
12
 	RCTBridge *_bridge;
12
 	RCTBridge *_bridge;
13
 	RNNReactComponentRegistry* _componentRegistry;
13
 	RNNReactComponentRegistry* _componentRegistry;
16
 # pragma mark public
16
 # pragma mark public
17
 
17
 
18
 
18
 
19
-- (instancetype)initWithRootViewCreator:(id <RNNRootViewCreator>)creator
19
+- (instancetype)initWithRootViewCreator:(id <RNNComponentViewCreator>)creator
20
 						   eventEmitter:(RNNEventEmitter*)eventEmitter
20
 						   eventEmitter:(RNNEventEmitter*)eventEmitter
21
 								  store:(RNNExternalComponentStore *)store
21
 								  store:(RNNExternalComponentStore *)store
22
 					   componentRegistry:(RNNReactComponentRegistry *)componentRegistry
22
 					   componentRegistry:(RNNReactComponentRegistry *)componentRegistry
103
 - (UIViewController *)createComponent:(RNNLayoutNode*)node {
103
 - (UIViewController *)createComponent:(RNNLayoutNode*)node {
104
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] initWithNode:node];
104
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] initWithNode:node];
105
 	RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:node.data[@"options"]];;
105
 	RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:node.data[@"options"]];;
106
-	RNNViewControllerPresenter* presenter = [[RNNViewControllerPresenter alloc] initWithComponentRegistry:_componentRegistry:_defaultOptions];
106
+	RNNComponentPresenter* presenter = [[RNNComponentPresenter alloc] initWithComponentRegistry:_componentRegistry:_defaultOptions];
107
 	
107
 	
108
-	RNNRootViewController* component = [[RNNRootViewController alloc] initWithLayoutInfo:layoutInfo rootViewCreator:_creator eventEmitter:_eventEmitter presenter:presenter options:options defaultOptions:_defaultOptions];
108
+	RNNComponentViewController* component = [[RNNComponentViewController alloc] initWithLayoutInfo:layoutInfo rootViewCreator:_creator eventEmitter:_eventEmitter presenter:presenter options:options defaultOptions:_defaultOptions];
109
 	
109
 	
110
 	return component;
110
 	return component;
111
 }
111
 }
113
 - (UIViewController *)createExternalComponent:(RNNLayoutNode*)node {
113
 - (UIViewController *)createExternalComponent:(RNNLayoutNode*)node {
114
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] initWithNode:node];
114
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] initWithNode:node];
115
 	RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:node.data[@"options"]];
115
 	RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:node.data[@"options"]];
116
-	RNNViewControllerPresenter* presenter = [[RNNViewControllerPresenter alloc] initWithDefaultOptions:_defaultOptions];
116
+	RNNComponentPresenter* presenter = [[RNNComponentPresenter alloc] initWithDefaultOptions:_defaultOptions];
117
 	
117
 	
118
 	UIViewController* externalVC = [_store getExternalComponent:layoutInfo bridge:_bridge];
118
 	UIViewController* externalVC = [_store getExternalComponent:layoutInfo bridge:_bridge];
119
 	
119
 	
120
-	RNNRootViewController* component = [[RNNRootViewController alloc] initExternalComponentWithLayoutInfo:layoutInfo eventEmitter:_eventEmitter presenter:presenter options:options defaultOptions:_defaultOptions];
120
+	RNNComponentViewController* component = [[RNNComponentViewController alloc] initExternalComponentWithLayoutInfo:layoutInfo eventEmitter:_eventEmitter presenter:presenter options:options defaultOptions:_defaultOptions];
121
 	[component bindViewController:externalVC];
121
 	[component bindViewController:externalVC];
122
 	
122
 	
123
 	return component;
123
 	return component;
124
 }
124
 }
125
 
125
 
126
 - (UIViewController *)createStack:(RNNLayoutNode*)node {
126
 - (UIViewController *)createStack:(RNNLayoutNode*)node {
127
-	RNNNavigationControllerPresenter* presenter = [[RNNNavigationControllerPresenter alloc] initWithComponentRegistry:_componentRegistry :_defaultOptions];
127
+	RNNStackPresenter* presenter = [[RNNStackPresenter alloc] initWithComponentRegistry:_componentRegistry :_defaultOptions];
128
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] initWithNode:node];
128
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] initWithNode:node];
129
 	RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:node.data[@"options"]];
129
 	RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:node.data[@"options"]];
130
 	
130
 	
131
 	NSArray *childViewControllers = [self extractChildrenViewControllersFromNode:node];
131
 	NSArray *childViewControllers = [self extractChildrenViewControllersFromNode:node];
132
 	
132
 	
133
-	RNNNavigationController* stack = [[RNNNavigationController alloc] initWithLayoutInfo:layoutInfo creator:_creator options:options defaultOptions:_defaultOptions presenter:presenter eventEmitter:_eventEmitter childViewControllers:childViewControllers];
133
+	RNNStackController* stack = [[RNNStackController alloc] initWithLayoutInfo:layoutInfo creator:_creator options:options defaultOptions:_defaultOptions presenter:presenter eventEmitter:_eventEmitter childViewControllers:childViewControllers];
134
 	
134
 	
135
 	return stack;
135
 	return stack;
136
 }
136
 }
138
 -(UIViewController *)createBottomTabs:(RNNLayoutNode*)node {
138
 -(UIViewController *)createBottomTabs:(RNNLayoutNode*)node {
139
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] initWithNode:node];
139
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] initWithNode:node];
140
 	RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:node.data[@"options"]];
140
 	RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:node.data[@"options"]];
141
-	RNNTabBarPresenter* presenter = [[RNNTabBarPresenter alloc] initWithDefaultOptions:_defaultOptions];
142
-
141
+	RNNBottomTabsPresenter* presenter = [[RNNBottomTabsPresenter alloc] initWithDefaultOptions:_defaultOptions];
143
 	NSArray *childViewControllers = [self extractChildrenViewControllersFromNode:node];
142
 	NSArray *childViewControllers = [self extractChildrenViewControllersFromNode:node];
144
-	
145
-	RNNTabBarController* tabsController = [[RNNTabBarController alloc] initWithLayoutInfo:layoutInfo
146
-            creator:_creator
147
-            options:options
148
-			defaultOptions:_defaultOptions
149
-			presenter:presenter
150
-			eventEmitter:_eventEmitter
151
-			childViewControllers:childViewControllers
143
+	return [[RNNBottomTabsController alloc] initWithLayoutInfo:layoutInfo
144
+																					  creator:_creator
145
+																					  options:options
146
+																			   defaultOptions:_defaultOptions
147
+																					presenter:presenter
148
+																				 eventEmitter:_eventEmitter
149
+																		 childViewControllers:childViewControllers
152
 	];
150
 	];
153
-	
154
-	return tabsController;
155
 }
151
 }
156
 
152
 
157
 - (UIViewController *)createTopTabs:(RNNLayoutNode*)node {
153
 - (UIViewController *)createTopTabs:(RNNLayoutNode*)node {
158
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] initWithNode:node];
154
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] initWithNode:node];
159
 	RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:node.data[@"options"]];
155
 	RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:node.data[@"options"]];
160
-	RNNViewControllerPresenter* presenter = [[RNNViewControllerPresenter alloc] initWithDefaultOptions :_defaultOptions];
156
+	RNNComponentPresenter* presenter = [[RNNComponentPresenter alloc] initWithDefaultOptions :_defaultOptions];
161
 
157
 
162
 	NSArray *childViewControllers = [self extractChildrenViewControllersFromNode:node];
158
 	NSArray *childViewControllers = [self extractChildrenViewControllersFromNode:node];
163
 	
159
 	
184
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] initWithNode:node];
180
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] initWithNode:node];
185
 	RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:node.data[@"options"]];
181
 	RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initWithDict:node.data[@"options"]];
186
 
182
 
187
-	RNNSideMenuChildVC *sideMenuChild = [[RNNSideMenuChildVC alloc] initWithLayoutInfo:layoutInfo creator:_creator options:options defaultOptions:_defaultOptions presenter:[[RNNViewControllerPresenter alloc] initWithComponentRegistry:_componentRegistry:_defaultOptions] eventEmitter:_eventEmitter childViewController:childVc type:type];
183
+	RNNSideMenuChildVC *sideMenuChild = [[RNNSideMenuChildVC alloc] initWithLayoutInfo:layoutInfo creator:_creator options:options defaultOptions:_defaultOptions presenter:[[RNNComponentPresenter alloc] initWithComponentRegistry:_componentRegistry:_defaultOptions] eventEmitter:_eventEmitter childViewController:childVc type:type];
188
 	
184
 	
189
 	return sideMenuChild;
185
 	return sideMenuChild;
190
 }
186
 }

+ 2
- 2
lib/ios/RNNInteractivePopAnimator.m View File

2
 #import "RNNAnimator.h"
2
 #import "RNNAnimator.h"
3
 #import "RNNAnimatedView.h"
3
 #import "RNNAnimatedView.h"
4
 #import "RNNElementView.h"
4
 #import "RNNElementView.h"
5
-#import "RNNRootViewController.h"
5
+#import "RNNComponentViewController.h"
6
 #import "VICMAImageView.h"
6
 #import "VICMAImageView.h"
7
 
7
 
8
 @interface  RNNInteractivePopAnimator()
8
 @interface  RNNInteractivePopAnimator()
68
 			[UIView animateWithDuration:0.5 delay:0 usingSpringWithDamping:0.8 initialSpringVelocity:0.8 options:UIViewAnimationOptionCurveEaseOut  animations:^{
68
 			[UIView animateWithDuration:0.5 delay:0 usingSpringWithDamping:0.8 initialSpringVelocity:0.8 options:UIViewAnimationOptionCurveEaseOut  animations:^{
69
 				self.imageSnapshot.frame = self.topFrame;
69
 				self.imageSnapshot.frame = self.topFrame;
70
 			} completion:^(BOOL finished) {
70
 			} completion:^(BOOL finished) {
71
-				self.nc.delegate = (RNNRootViewController*)self.vc;
71
+				self.nc.delegate = (RNNComponentViewController*)self.vc;
72
 			}];
72
 			}];
73
 		} else {
73
 		} else {
74
 			[UIView animateWithDuration:0.3 delay:0 usingSpringWithDamping:0.8 initialSpringVelocity:0.8 options:UIViewAnimationOptionCurveEaseOut  animations:^{
74
 			[UIView animateWithDuration:0.3 delay:0 usingSpringWithDamping:0.8 initialSpringVelocity:0.8 options:UIViewAnimationOptionCurveEaseOut  animations:^{

+ 2
- 2
lib/ios/RNNLayoutProtocol.h View File

1
 #import "RNNLayoutInfo.h"
1
 #import "RNNLayoutInfo.h"
2
 #import "RNNBasePresenter.h"
2
 #import "RNNBasePresenter.h"
3
-#import "RNNRootViewCreator.h"
3
+#import "RNNComponentViewCreator.h"
4
 #import "RNNEventEmitter.h"
4
 #import "RNNEventEmitter.h"
5
 
5
 
6
 typedef void (^RNNReactViewReadyCompletionBlock)(void);
6
 typedef void (^RNNReactViewReadyCompletionBlock)(void);
10
 @required
10
 @required
11
 
11
 
12
 - (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo
12
 - (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo
13
-						   creator:(id<RNNRootViewCreator>)creator
13
+						   creator:(id<RNNComponentViewCreator>)creator
14
 						   options:(RNNNavigationOptions *)options
14
 						   options:(RNNNavigationOptions *)options
15
 					defaultOptions:(RNNNavigationOptions *)defaultOptions
15
 					defaultOptions:(RNNNavigationOptions *)defaultOptions
16
 						 presenter:(RNNBasePresenter *)presenter
16
 						 presenter:(RNNBasePresenter *)presenter

+ 1
- 1
lib/ios/RNNModalManager.m View File

1
 #import "RNNModalManager.h"
1
 #import "RNNModalManager.h"
2
-#import "RNNRootViewController.h"
2
+#import "RNNComponentViewController.h"
3
 #import "RNNAnimationsTransitionDelegate.h"
3
 #import "RNNAnimationsTransitionDelegate.h"
4
 #import "RNNLayoutProtocol.h"
4
 #import "RNNLayoutProtocol.h"
5
 
5
 

+ 1
- 1
lib/ios/RNNNavigationButtons.h View File

1
 #import <Foundation/Foundation.h>
1
 #import <Foundation/Foundation.h>
2
 #import <UIKit/UIKit.h>
2
 #import <UIKit/UIKit.h>
3
 #import "RNNButtonOptions.h"
3
 #import "RNNButtonOptions.h"
4
-#import "RNNRootViewCreator.h"
4
+#import "RNNComponentViewCreator.h"
5
 #import "RNNReactComponentRegistry.h"
5
 #import "RNNReactComponentRegistry.h"
6
 
6
 
7
 @interface RNNNavigationButtons : NSObject
7
 @interface RNNNavigationButtons : NSObject

+ 1
- 1
lib/ios/RNNNavigationButtons.m View File

3
 #import <React/RCTConvert.h>
3
 #import <React/RCTConvert.h>
4
 #import "RCTHelpers.h"
4
 #import "RCTHelpers.h"
5
 #import "UIImage+tint.h"
5
 #import "UIImage+tint.h"
6
-#import "RNNRootViewController.h"
6
+#import "RNNComponentViewController.h"
7
 #import "UIImage+insets.h"
7
 #import "UIImage+insets.h"
8
 #import "UIViewController+LayoutProtocol.h"
8
 #import "UIViewController+LayoutProtocol.h"
9
 
9
 

+ 0
- 12
lib/ios/RNNNavigationController.h View File

1
-#import <UIKit/UIKit.h>
2
-#import "RNNNavigationControllerPresenter.h"
3
-#import "UINavigationController+RNNOptions.h"
4
-#import "UIViewController+LayoutProtocol.h"
5
-
6
-@interface RNNNavigationController : UINavigationController <RNNLayoutProtocol>
7
-
8
-@property (nonatomic, retain) RNNNavigationControllerPresenter* presenter;
9
-
10
-- (void)setTopBarBackgroundColor:(UIColor *)backgroundColor;
11
-
12
-@end

+ 0
- 231
lib/ios/RNNNavigationControllerPresenter.m View File

1
-#import "RNNNavigationControllerPresenter.h"
2
-#import "UINavigationController+RNNOptions.h"
3
-#import "RNNNavigationController.h"
4
-#import "RNNCustomTitleView.h"
5
-
6
-@interface RNNNavigationControllerPresenter() {
7
-	RNNReactComponentRegistry* _componentRegistry;
8
-	UIView* _customTopBar;
9
-	UIView* _customTopBarBackground;
10
-	RNNReactView* _customTopBarBackgroundReactView;
11
-}
12
-
13
-@end
14
-@implementation RNNNavigationControllerPresenter
15
-
16
-- (instancetype)initWithComponentRegistry:(RNNReactComponentRegistry *)componentRegistry:(RNNNavigationOptions *)defaultOptions {
17
-	self = [super initWithDefaultOptions:defaultOptions];
18
-	_componentRegistry = componentRegistry;
19
-	return self;
20
-}
21
-
22
-- (void)applyOptions:(RNNNavigationOptions *)options {
23
-	[super applyOptions:options];
24
-	
25
-	RNNNavigationController* navigationController = self.boundViewController;
26
-	RNNNavigationOptions * withDefault = [options withDefault:[self defaultOptions]];
27
-	
28
-	self.interactivePopGestureDelegate = [InteractivePopGestureDelegate new];
29
-	self.interactivePopGestureDelegate.navigationController = navigationController;
30
-	self.interactivePopGestureDelegate.originalDelegate = navigationController.interactivePopGestureRecognizer.delegate;
31
-	navigationController.interactivePopGestureRecognizer.delegate = self.interactivePopGestureDelegate;
32
-	
33
-	[navigationController rnn_setInteractivePopGestureEnabled:[withDefault.popGesture getWithDefaultValue:YES]];
34
-	[navigationController rnn_setRootBackgroundImage:[withDefault.rootBackgroundImage getWithDefaultValue:nil]];
35
-	[navigationController rnn_setNavigationBarTestID:[withDefault.topBar.testID getWithDefaultValue:nil]];
36
-	[navigationController rnn_setNavigationBarVisible:[withDefault.topBar.visible getWithDefaultValue:YES] animated:[withDefault.topBar.animate getWithDefaultValue:YES]];
37
-	[navigationController rnn_hideBarsOnScroll:[withDefault.topBar.hideOnScroll getWithDefaultValue:NO]];
38
-	[navigationController rnn_setNavigationBarNoBorder:[withDefault.topBar.noBorder getWithDefaultValue:NO]];
39
-	[navigationController rnn_setBarStyle:[RCTConvert UIBarStyle:[withDefault.topBar.barStyle getWithDefaultValue:@"default"]]];
40
-	[navigationController rnn_setNavigationBarTranslucent:[withDefault.topBar.background.translucent getWithDefaultValue:NO]];
41
-	[navigationController rnn_setNavigationBarClipsToBounds:[withDefault.topBar.background.clipToBounds getWithDefaultValue:NO]];
42
-	[navigationController rnn_setNavigationBarBlur:[withDefault.topBar.background.blur getWithDefaultValue:NO]];
43
-	[navigationController setTopBarBackgroundColor:[withDefault.topBar.background.color getWithDefaultValue:nil]];
44
-	[navigationController rnn_setNavigationBarLargeTitleVisible:[withDefault.topBar.largeTitle.visible getWithDefaultValue:NO]];
45
-	[navigationController rnn_setNavigationBarLargeTitleFontFamily:[withDefault.topBar.largeTitle.fontFamily getWithDefaultValue:nil] fontSize:[withDefault.topBar.largeTitle.fontSize getWithDefaultValue:nil] color:[withDefault.topBar.largeTitle.color getWithDefaultValue:nil]];
46
-	[navigationController rnn_setNavigationBarFontFamily:[withDefault.topBar.title.fontFamily getWithDefaultValue:nil] fontSize:[withDefault.topBar.title.fontSize getWithDefaultValue:nil] color:[withDefault.topBar.title.color getWithDefaultValue:nil]];
47
-	[navigationController rnn_setBackButtonColor:[withDefault.topBar.backButton.color getWithDefaultValue:nil]];
48
-}
49
-
50
-- (void)applyOptionsOnViewDidLayoutSubviews:(RNNNavigationOptions *)options {
51
-	RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
52
-	if (withDefault.topBar.background.component.name.hasValue) {
53
-		[self presentBackgroundComponent];
54
-	}
55
-}
56
-
57
-- (void)applyOptionsBeforePopping:(RNNNavigationOptions *)options {
58
-	RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
59
-	RNNNavigationController* navigationController = self.boundViewController;
60
-	[navigationController setTopBarBackgroundColor:[withDefault.topBar.background.color getWithDefaultValue:nil]];
61
-	[navigationController rnn_setNavigationBarFontFamily:[withDefault.topBar.title.fontFamily getWithDefaultValue:nil] fontSize:[withDefault.topBar.title.fontSize getWithDefaultValue:nil] color:[withDefault.topBar.title.color getWithDefaultValue:[UIColor blackColor]]];
62
-	[navigationController rnn_setNavigationBarLargeTitleVisible:[withDefault.topBar.largeTitle.visible getWithDefaultValue:NO]];
63
-}
64
-
65
-- (void)mergeOptions:(RNNNavigationOptions *)newOptions currentOptions:(RNNNavigationOptions *)currentOptions {
66
-	[super mergeOptions:newOptions currentOptions:currentOptions];
67
-	
68
-	RNNNavigationController* navigationController = self.boundViewController;
69
-	
70
-	if (newOptions.popGesture.hasValue) {
71
-		[navigationController rnn_setInteractivePopGestureEnabled:newOptions.popGesture.get];
72
-	}
73
-	
74
-	if (newOptions.rootBackgroundImage.hasValue) {
75
-		[navigationController rnn_setRootBackgroundImage:newOptions.rootBackgroundImage.get];
76
-	}
77
-	
78
-	if (newOptions.topBar.testID.hasValue) {
79
-		[navigationController rnn_setNavigationBarTestID:newOptions.topBar.testID.get];
80
-	}
81
-	
82
-	if (newOptions.topBar.visible.hasValue) {
83
-		[navigationController rnn_setNavigationBarVisible:newOptions.topBar.visible.get animated:[newOptions.topBar.animate getWithDefaultValue:YES]];
84
-	}
85
-	
86
-	if (newOptions.topBar.hideOnScroll.hasValue) {
87
-		[navigationController rnn_hideBarsOnScroll:[newOptions.topBar.hideOnScroll get]];
88
-	}
89
-	
90
-	if (newOptions.topBar.noBorder.hasValue) {
91
-		[navigationController rnn_setNavigationBarNoBorder:[newOptions.topBar.noBorder get]];
92
-	}
93
-	
94
-	if (newOptions.topBar.barStyle.hasValue) {
95
-		[navigationController rnn_setBarStyle:[RCTConvert UIBarStyle:newOptions.topBar.barStyle.get]];
96
-	}
97
-	
98
-	if (newOptions.topBar.background.translucent.hasValue) {
99
-		[navigationController rnn_setNavigationBarTranslucent:[newOptions.topBar.background.translucent get]];
100
-	}
101
-	
102
-	if (newOptions.topBar.background.clipToBounds.hasValue) {
103
-		[navigationController rnn_setNavigationBarClipsToBounds:[newOptions.topBar.background.clipToBounds get]];
104
-	}
105
-	
106
-	if (newOptions.topBar.background.blur.hasValue) {
107
-		[navigationController rnn_setNavigationBarBlur:[newOptions.topBar.background.blur get]];
108
-	}
109
-	
110
-	if (newOptions.topBar.background.color.hasValue) {
111
-		[navigationController setTopBarBackgroundColor:newOptions.topBar.background.color.get];
112
-	}
113
-	
114
-	if (newOptions.topBar.largeTitle.visible.hasValue) {
115
-		[navigationController rnn_setNavigationBarLargeTitleVisible:newOptions.topBar.largeTitle.visible.get];
116
-	}
117
-	
118
-	if (newOptions.topBar.backButton.color.hasValue) {
119
-		[navigationController rnn_setBackButtonColor:newOptions.topBar.backButton.color.get];
120
-	}
121
-	
122
-
123
-	RNNLargeTitleOptions *largeTitleOptions = newOptions.topBar.largeTitle;
124
-	if (largeTitleOptions.color.hasValue || largeTitleOptions.fontSize.hasValue || largeTitleOptions.fontFamily.hasValue) {
125
-		[navigationController rnn_setNavigationBarLargeTitleFontFamily:[newOptions.topBar.largeTitle.fontFamily getWithDefaultValue:nil] fontSize:[newOptions.topBar.largeTitle.fontSize getWithDefaultValue:nil] color:[newOptions.topBar.largeTitle.color getWithDefaultValue:nil]];
126
-	}
127
-
128
-	RNNNavigationOptions * withDefault = (RNNNavigationOptions *) [[newOptions mergeInOptions:currentOptions] withDefault:[self defaultOptions]];
129
-	[navigationController rnn_setNavigationBarFontFamily:[withDefault.topBar.title.fontFamily getWithDefaultValue:nil]
130
-												fontSize:[withDefault.topBar.title.fontSize getWithDefaultValue:nil]
131
-												   color:[withDefault.topBar.title.color getWithDefaultValue:nil]];
132
-	
133
-	if (newOptions.topBar.component.name.hasValue) {
134
-		[self setCustomNavigationBarView:newOptions perform:nil];
135
-	}
136
-	
137
-	if (newOptions.topBar.background.component.name.hasValue) {
138
-		[self setCustomNavigationComponentBackground:newOptions perform:nil];
139
-	}
140
-}
141
-
142
-- (void)renderComponents:(RNNNavigationOptions *)options perform:(RNNReactViewReadyCompletionBlock)readyBlock {
143
-	dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
144
-		dispatch_group_t group = dispatch_group_create();
145
-		
146
-		dispatch_group_enter(group);
147
-		dispatch_async(dispatch_get_main_queue(), ^{
148
-			[self setCustomNavigationBarView:options perform:^{
149
-				dispatch_group_leave(group);
150
-			}];
151
-		});
152
-		
153
-		dispatch_group_enter(group);
154
-		dispatch_async(dispatch_get_main_queue(), ^{
155
-			[self setCustomNavigationComponentBackground:options perform:^{
156
-				dispatch_group_leave(group);
157
-			}];
158
-		});
159
-		
160
-		dispatch_group_wait(group, DISPATCH_TIME_FOREVER);
161
-		
162
-		dispatch_async(dispatch_get_main_queue(), ^{
163
-			if (readyBlock) {
164
-				readyBlock();
165
-			}
166
-		});
167
-	});
168
-}
169
-
170
-- (void)setCustomNavigationBarView:(RNNNavigationOptions *)options perform:(RNNReactViewReadyCompletionBlock)readyBlock {
171
-	RNNNavigationController* navigationController = self.boundViewController;
172
-	if (![options.topBar.component.waitForRender getWithDefaultValue:NO] && readyBlock) {
173
-		readyBlock();
174
-		readyBlock = nil;
175
-	}
176
-	if (options.topBar.component.name.hasValue) {
177
-		NSString* currentChildComponentId = [navigationController getCurrentChild].layoutInfo.componentId;
178
-		RCTRootView *reactView = [_componentRegistry createComponentIfNotExists:options.topBar.component parentComponentId:currentChildComponentId reactViewReadyBlock:readyBlock];
179
-		
180
-		if (_customTopBar) {
181
-			[_customTopBar removeFromSuperview];
182
-		}
183
-		_customTopBar = [[RNNCustomTitleView alloc] initWithFrame:navigationController.navigationBar.bounds subView:reactView alignment:@"fill"];
184
-		reactView.backgroundColor = UIColor.clearColor;
185
-		_customTopBar.backgroundColor = UIColor.clearColor;
186
-		[navigationController.navigationBar addSubview:_customTopBar];
187
-	} else {
188
-		[_customTopBar removeFromSuperview];
189
-		_customTopBar = nil;
190
-		if (readyBlock) {
191
-			readyBlock();
192
-		}
193
-	}
194
-}
195
-
196
-- (void)setCustomNavigationComponentBackground:(RNNNavigationOptions *)options perform:(RNNReactViewReadyCompletionBlock)readyBlock {
197
-	RNNNavigationController* navigationController = self.boundViewController;
198
-	if (![options.topBar.background.component.waitForRender getWithDefaultValue:NO] && readyBlock) {
199
-		readyBlock();
200
-		readyBlock = nil;
201
-	}
202
-	if (options.topBar.background.component.name.hasValue) {
203
-		NSString* currentChildComponentId = [navigationController getCurrentChild].layoutInfo.componentId;
204
-		RNNReactView *reactView = [_componentRegistry createComponentIfNotExists:options.topBar.background.component parentComponentId:currentChildComponentId reactViewReadyBlock:readyBlock];
205
-		_customTopBarBackgroundReactView = reactView;
206
-		
207
-	} else {
208
-		[_customTopBarBackground removeFromSuperview];
209
-		_customTopBarBackground = nil;
210
-		if (readyBlock) {
211
-			readyBlock();
212
-		}
213
-	}
214
-}
215
-
216
-- (void)presentBackgroundComponent {
217
-	RNNNavigationController* navigationController = self.boundViewController;
218
-	if (_customTopBarBackground) {
219
-		[_customTopBarBackground removeFromSuperview];
220
-	}
221
-	RNNCustomTitleView* customTopBarBackground = [[RNNCustomTitleView alloc] initWithFrame:navigationController.navigationBar.bounds subView:_customTopBarBackgroundReactView alignment:@"fill"];
222
-	_customTopBarBackground = customTopBarBackground;
223
-	
224
-	[navigationController.navigationBar insertSubview:_customTopBarBackground atIndex:1];
225
-}
226
-
227
-- (void)dealloc {
228
-	[_componentRegistry removeComponent:self.boundComponentId];
229
-}
230
-
231
-@end

+ 3
- 3
lib/ios/RNNNavigationOptions.m View File

1
 #import "RNNNavigationOptions.h"
1
 #import "RNNNavigationOptions.h"
2
 #import <React/RCTConvert.h>
2
 #import <React/RCTConvert.h>
3
-#import "RNNNavigationController.h"
4
-#import "RNNTabBarController.h"
3
+#import "RNNStackController.h"
4
+#import "RNNBottomTabsController.h"
5
 #import "RNNTopBarOptions.h"
5
 #import "RNNTopBarOptions.h"
6
 #import "RNNSideMenuController.h"
6
 #import "RNNSideMenuController.h"
7
-#import "RNNRootViewController.h"
7
+#import "RNNComponentViewController.h"
8
 #import "RNNSplitViewController.h"
8
 #import "RNNSplitViewController.h"
9
 #import "RNNNavigationButtons.h"
9
 #import "RNNNavigationButtons.h"
10
 #import "RNNSplitViewOptions.h"
10
 #import "RNNSplitViewOptions.h"

+ 2
- 2
lib/ios/RNNReactComponentRegistry.h View File

1
 #import <Foundation/Foundation.h>
1
 #import <Foundation/Foundation.h>
2
 #import "RNNReactView.h"
2
 #import "RNNReactView.h"
3
 #import "RNNComponentOptions.h"
3
 #import "RNNComponentOptions.h"
4
-#import "RNNRootViewCreator.h"
4
+#import "RNNComponentViewCreator.h"
5
 
5
 
6
 @interface RNNReactComponentRegistry : NSObject
6
 @interface RNNReactComponentRegistry : NSObject
7
 
7
 
8
-- (instancetype)initWithCreator:(id<RNNRootViewCreator>)creator;
8
+- (instancetype)initWithCreator:(id<RNNComponentViewCreator>)creator;
9
 
9
 
10
 - (RNNReactView *)createComponentIfNotExists:(RNNComponentOptions *)component parentComponentId:(NSString *)parentComponentId reactViewReadyBlock:(RNNReactViewReadyCompletionBlock)reactViewReadyBlock;
10
 - (RNNReactView *)createComponentIfNotExists:(RNNComponentOptions *)component parentComponentId:(NSString *)parentComponentId reactViewReadyBlock:(RNNReactViewReadyCompletionBlock)reactViewReadyBlock;
11
 
11
 

+ 2
- 2
lib/ios/RNNReactComponentRegistry.m View File

1
 #import "RNNReactComponentRegistry.h"
1
 #import "RNNReactComponentRegistry.h"
2
 
2
 
3
 @interface RNNReactComponentRegistry () {
3
 @interface RNNReactComponentRegistry () {
4
-	id<RNNRootViewCreator> _creator;
4
+	id<RNNComponentViewCreator> _creator;
5
 	NSMapTable* _componentStore;
5
 	NSMapTable* _componentStore;
6
 }
6
 }
7
 
7
 
9
 
9
 
10
 @implementation RNNReactComponentRegistry
10
 @implementation RNNReactComponentRegistry
11
 
11
 
12
-- (instancetype)initWithCreator:(id<RNNRootViewCreator>)creator {
12
+- (instancetype)initWithCreator:(id<RNNComponentViewCreator>)creator {
13
 	self = [super init];
13
 	self = [super init];
14
 	_creator = creator;
14
 	_creator = creator;
15
 	_componentStore = [NSMapTable new];
15
 	_componentStore = [NSMapTable new];

+ 2
- 2
lib/ios/RNNReactRootViewCreator.h View File

1
 #import <Foundation/Foundation.h>
1
 #import <Foundation/Foundation.h>
2
-#import "RNNRootViewCreator.h"
2
+#import "RNNComponentViewCreator.h"
3
 
3
 
4
 #import <React/RCTBridge.h>
4
 #import <React/RCTBridge.h>
5
 
5
 
6
-@interface RNNReactRootViewCreator : NSObject <RNNRootViewCreator>
6
+@interface RNNReactRootViewCreator : NSObject <RNNComponentViewCreator>
7
 
7
 
8
 -(instancetype)initWithBridge:(RCTBridge*)bridge;
8
 -(instancetype)initWithBridge:(RCTBridge*)bridge;
9
 
9
 

+ 2
- 2
lib/ios/RNNSideMenuChildVC.h View File

1
 #import <UIKit/UIKit.h>
1
 #import <UIKit/UIKit.h>
2
-#import "RNNViewControllerPresenter.h"
2
+#import "RNNComponentPresenter.h"
3
 #import "RNNLayoutProtocol.h"
3
 #import "RNNLayoutProtocol.h"
4
 
4
 
5
 typedef NS_ENUM(NSInteger, RNNSideMenuChildType) {
5
 typedef NS_ENUM(NSInteger, RNNSideMenuChildType) {
11
 
11
 
12
 @interface RNNSideMenuChildVC : UIViewController <RNNLayoutProtocol>
12
 @interface RNNSideMenuChildVC : UIViewController <RNNLayoutProtocol>
13
 
13
 
14
-- (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo creator:(id<RNNRootViewCreator>)creator options:(RNNNavigationOptions *)options defaultOptions:(RNNNavigationOptions *)defaultOptions presenter:(RNNBasePresenter *)presenter eventEmitter:(RNNEventEmitter *)eventEmitter childViewController:(UIViewController *)childViewController type:(RNNSideMenuChildType)type;
14
+- (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo creator:(id<RNNComponentViewCreator>)creator options:(RNNNavigationOptions *)options defaultOptions:(RNNNavigationOptions *)defaultOptions presenter:(RNNBasePresenter *)presenter eventEmitter:(RNNEventEmitter *)eventEmitter childViewController:(UIViewController *)childViewController type:(RNNSideMenuChildType)type;
15
 
15
 
16
 @property (readonly) RNNSideMenuChildType type;
16
 @property (readonly) RNNSideMenuChildType type;
17
 @property (readonly) UIViewController<RNNLayoutProtocol> *child;
17
 @property (readonly) UIViewController<RNNLayoutProtocol> *child;

+ 1
- 1
lib/ios/RNNSideMenuChildVC.m View File

10
 @implementation RNNSideMenuChildVC
10
 @implementation RNNSideMenuChildVC
11
 
11
 
12
 
12
 
13
-- (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo creator:(id<RNNRootViewCreator>)creator options:(RNNNavigationOptions *)options defaultOptions:(RNNNavigationOptions *)defaultOptions presenter:(RNNBasePresenter *)presenter eventEmitter:(RNNEventEmitter *)eventEmitter childViewController:(UIViewController *)childViewController type:(RNNSideMenuChildType)type {
13
+- (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo creator:(id<RNNComponentViewCreator>)creator options:(RNNNavigationOptions *)options defaultOptions:(RNNNavigationOptions *)defaultOptions presenter:(RNNBasePresenter *)presenter eventEmitter:(RNNEventEmitter *)eventEmitter childViewController:(UIViewController *)childViewController type:(RNNSideMenuChildType)type {
14
 	self = [super initWithLayoutInfo:layoutInfo creator:creator options:options defaultOptions:defaultOptions presenter:presenter eventEmitter:eventEmitter childViewControllers:nil];
14
 	self = [super initWithLayoutInfo:layoutInfo creator:creator options:options defaultOptions:defaultOptions presenter:presenter eventEmitter:eventEmitter childViewControllers:nil];
15
 	self.type = type;
15
 	self.type = type;
16
 	self.child = childViewController;
16
 	self.child = childViewController;

+ 1
- 1
lib/ios/RNNSideMenuController.h View File

6
 
6
 
7
 @interface RNNSideMenuController : MMDrawerController <RNNLayoutProtocol>
7
 @interface RNNSideMenuController : MMDrawerController <RNNLayoutProtocol>
8
 
8
 
9
-- (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo creator:(id<RNNRootViewCreator>)creator childViewControllers:(NSArray *)childViewControllers options:(RNNNavigationOptions *)options defaultOptions:(RNNNavigationOptions *)defaultOptions presenter:(RNNBasePresenter *)presenter eventEmitter:(RNNEventEmitter *)eventEmitter;
9
+- (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo creator:(id<RNNComponentViewCreator>)creator childViewControllers:(NSArray *)childViewControllers options:(RNNNavigationOptions *)options defaultOptions:(RNNNavigationOptions *)defaultOptions presenter:(RNNBasePresenter *)presenter eventEmitter:(RNNEventEmitter *)eventEmitter;
10
 
10
 
11
 @property (readonly) RNNSideMenuChildVC *center;
11
 @property (readonly) RNNSideMenuChildVC *center;
12
 @property (readonly) RNNSideMenuChildVC *left;
12
 @property (readonly) RNNSideMenuChildVC *left;

+ 1
- 1
lib/ios/RNNSideMenuController.m View File

11
 
11
 
12
 @implementation RNNSideMenuController
12
 @implementation RNNSideMenuController
13
 
13
 
14
-- (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo creator:(id<RNNRootViewCreator>)creator childViewControllers:(NSArray *)childViewControllers options:(RNNNavigationOptions *)options defaultOptions:(RNNNavigationOptions *)defaultOptions presenter:(RNNBasePresenter *)presenter eventEmitter:(RNNEventEmitter *)eventEmitter {
14
+- (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo creator:(id<RNNComponentViewCreator>)creator childViewControllers:(NSArray *)childViewControllers options:(RNNNavigationOptions *)options defaultOptions:(RNNNavigationOptions *)defaultOptions presenter:(RNNBasePresenter *)presenter eventEmitter:(RNNEventEmitter *)eventEmitter {
15
 	[self setControllers:childViewControllers];
15
 	[self setControllers:childViewControllers];
16
 	self = [super initWithCenterViewController:self.center leftDrawerViewController:self.left rightDrawerViewController:self.right];
16
 	self = [super initWithCenterViewController:self.center leftDrawerViewController:self.left rightDrawerViewController:self.right];
17
 	
17
 	

+ 43
- 44
lib/ios/RNNSideMenuPresenter.m View File

11
 - (void)applyOptions:(RNNNavigationOptions *)options {
11
 - (void)applyOptions:(RNNNavigationOptions *)options {
12
 	[super applyOptions:options];
12
 	[super applyOptions:options];
13
 	RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
13
 	RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
14
-	RNNSideMenuController* sideMenuController = self.boundViewController;
14
+	RNNSideMenuController* sideMenu = self.boundViewController;
15
 
15
 
16
-	[sideMenuController side:MMDrawerSideLeft enabled:[withDefault.sideMenu.left.enabled getWithDefaultValue:YES]];
17
-	[sideMenuController side:MMDrawerSideRight enabled:[withDefault.sideMenu.right.enabled getWithDefaultValue:YES]];
16
+	[sideMenu side:MMDrawerSideLeft enabled:[withDefault.sideMenu.left.enabled getWithDefaultValue:YES]];
17
+	[sideMenu side:MMDrawerSideRight enabled:[withDefault.sideMenu.right.enabled getWithDefaultValue:YES]];
18
 	
18
 	
19
-	[sideMenuController setShouldStretchLeftDrawer:[withDefault.sideMenu.left.shouldStretchDrawer getWithDefaultValue:YES]];
20
-	[sideMenuController setShouldStretchRightDrawer:[withDefault.sideMenu.right.shouldStretchDrawer getWithDefaultValue:YES]];
19
+	[sideMenu setShouldStretchLeftDrawer:[withDefault.sideMenu.left.shouldStretchDrawer getWithDefaultValue:YES]];
20
+	[sideMenu setShouldStretchRightDrawer:[withDefault.sideMenu.right.shouldStretchDrawer getWithDefaultValue:YES]];
21
 	
21
 	
22
-	[sideMenuController setAnimationVelocityLeft:[withDefault.sideMenu.left.animationVelocity getWithDefaultValue:840.0f]];
23
-	[sideMenuController setAnimationVelocityRight:[withDefault.sideMenu.right.animationVelocity getWithDefaultValue:840.0f]];
22
+	[sideMenu setAnimationVelocityLeft:[withDefault.sideMenu.left.animationVelocity getWithDefaultValue:840.0f]];
23
+	[sideMenu setAnimationVelocityRight:[withDefault.sideMenu.right.animationVelocity getWithDefaultValue:840.0f]];
24
 	
24
 	
25
-	[sideMenuController setAnimationType:[withDefault.sideMenu.animationType getWithDefaultValue:nil]];
25
+	[sideMenu setAnimationType:[withDefault.sideMenu.animationType getWithDefaultValue:nil]];
26
 	
26
 	
27
 	if (withDefault.sideMenu.left.width.hasValue) {
27
 	if (withDefault.sideMenu.left.width.hasValue) {
28
-		[sideMenuController side:MMDrawerSideLeft width:withDefault.sideMenu.left.width.get];
28
+		[sideMenu side:MMDrawerSideLeft width:withDefault.sideMenu.left.width.get];
29
 	}
29
 	}
30
 	
30
 	
31
 	if (withDefault.sideMenu.right.width.hasValue) {
31
 	if (withDefault.sideMenu.right.width.hasValue) {
32
-		[sideMenuController side:MMDrawerSideRight width:withDefault.sideMenu.right.width.get];
32
+		[sideMenu side:MMDrawerSideRight width:withDefault.sideMenu.right.width.get];
33
 	}
33
 	}
34
 	
34
 	
35
 	if (withDefault.sideMenu.left.visible.hasValue) {
35
 	if (withDefault.sideMenu.left.visible.hasValue) {
36
-		[sideMenuController side:MMDrawerSideLeft visible:withDefault.sideMenu.left.visible.get];
36
+		[sideMenu side:MMDrawerSideLeft visible:withDefault.sideMenu.left.visible.get];
37
 		[withDefault.sideMenu.left.visible consume];
37
 		[withDefault.sideMenu.left.visible consume];
38
 	}
38
 	}
39
 	
39
 	
40
 	if (withDefault.sideMenu.right.visible.hasValue) {
40
 	if (withDefault.sideMenu.right.visible.hasValue) {
41
-		[sideMenuController side:MMDrawerSideRight visible:withDefault.sideMenu.right.visible.get];
41
+		[sideMenu side:MMDrawerSideRight visible:withDefault.sideMenu.right.visible.get];
42
 		[withDefault.sideMenu.right.visible consume];
42
 		[withDefault.sideMenu.right.visible consume];
43
 	}
43
 	}
44
 }
44
 }
47
 	[super applyOptionsOnInit:initialOptions];
47
 	[super applyOptionsOnInit:initialOptions];
48
 
48
 
49
 	RNNNavigationOptions *withDefault = [initialOptions withDefault:[self defaultOptions]];
49
 	RNNNavigationOptions *withDefault = [initialOptions withDefault:[self defaultOptions]];
50
-	RNNSideMenuController* sideMenuController = self.boundViewController;
50
+	RNNSideMenuController* sideMenu = self.boundViewController;
51
 	if (withDefault.sideMenu.left.width.hasValue) {
51
 	if (withDefault.sideMenu.left.width.hasValue) {
52
-		[sideMenuController side:MMDrawerSideLeft width:withDefault.sideMenu.left.width.get];
52
+		[sideMenu side:MMDrawerSideLeft width:withDefault.sideMenu.left.width.get];
53
 	}
53
 	}
54
 	
54
 	
55
 	if (withDefault.sideMenu.right.width.hasValue) {
55
 	if (withDefault.sideMenu.right.width.hasValue) {
56
-		[sideMenuController side:MMDrawerSideRight width:withDefault.sideMenu.right.width.get];
56
+		[sideMenu side:MMDrawerSideRight width:withDefault.sideMenu.right.width.get];
57
 	}
57
 	}
58
 
58
 
59
-		[sideMenuController setOpenDrawerGestureModeMask:[[withDefault.sideMenu.openGestureMode getWithDefaultValue:@(MMOpenDrawerGestureModeAll)] integerValue]];
59
+		[sideMenu setOpenDrawerGestureModeMask:[[withDefault.sideMenu.openGestureMode getWithDefaultValue:@(MMOpenDrawerGestureModeAll)] integerValue]];
60
 }
60
 }
61
 
61
 
62
-- (void)mergeOptions:(RNNNavigationOptions *)newOptions currentOptions:(RNNNavigationOptions *)currentOptions {
63
-	[super mergeOptions:newOptions currentOptions:currentOptions];
62
+- (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigationOptions *)currentOptions {
63
+    [super mergeOptions:options resolvedOptions:currentOptions];
64
+	RNNSideMenuController* sideMenu = self.boundViewController;
64
 	
65
 	
65
-	RNNSideMenuController* sideMenuController = self.boundViewController;
66
-	
67
-	if (newOptions.sideMenu.left.enabled.hasValue) {
68
-		[sideMenuController side:MMDrawerSideLeft enabled:newOptions.sideMenu.left.enabled.get];
66
+	if (options.sideMenu.left.enabled.hasValue) {
67
+		[sideMenu side:MMDrawerSideLeft enabled:options.sideMenu.left.enabled.get];
69
 	}
68
 	}
70
 	
69
 	
71
-	if (newOptions.sideMenu.right.enabled.hasValue) {
72
-		[sideMenuController side:MMDrawerSideRight enabled:newOptions.sideMenu.right.enabled.get];
70
+	if (options.sideMenu.right.enabled.hasValue) {
71
+		[sideMenu side:MMDrawerSideRight enabled:options.sideMenu.right.enabled.get];
73
 	}
72
 	}
74
 	
73
 	
75
-	if (newOptions.sideMenu.left.visible.hasValue) {
76
-		[sideMenuController side:MMDrawerSideLeft visible:newOptions.sideMenu.left.visible.get];
77
-		[newOptions.sideMenu.left.visible consume];
74
+	if (options.sideMenu.left.visible.hasValue) {
75
+		[sideMenu side:MMDrawerSideLeft visible:options.sideMenu.left.visible.get];
76
+		[options.sideMenu.left.visible consume];
78
 	}
77
 	}
79
 	
78
 	
80
-	if (newOptions.sideMenu.right.visible.hasValue) {
81
-		[sideMenuController side:MMDrawerSideRight visible:newOptions.sideMenu.right.visible.get];
82
-		[newOptions.sideMenu.right.visible consume];
79
+	if (options.sideMenu.right.visible.hasValue) {
80
+		[sideMenu side:MMDrawerSideRight visible:options.sideMenu.right.visible.get];
81
+		[options.sideMenu.right.visible consume];
83
 	}
82
 	}
84
 	
83
 	
85
-	if (newOptions.sideMenu.left.width.hasValue) {
86
-		[sideMenuController side:MMDrawerSideLeft width:newOptions.sideMenu.left.width.get];
84
+	if (options.sideMenu.left.width.hasValue) {
85
+		[sideMenu side:MMDrawerSideLeft width:options.sideMenu.left.width.get];
87
 	}
86
 	}
88
 	
87
 	
89
-	if (newOptions.sideMenu.right.width.hasValue) {
90
-		[sideMenuController side:MMDrawerSideRight width:newOptions.sideMenu.right.width.get];
88
+	if (options.sideMenu.right.width.hasValue) {
89
+		[sideMenu side:MMDrawerSideRight width:options.sideMenu.right.width.get];
91
 	}
90
 	}
92
 	
91
 	
93
-	if (newOptions.sideMenu.left.shouldStretchDrawer.hasValue) {
94
-		sideMenuController.shouldStretchLeftDrawer = newOptions.sideMenu.left.shouldStretchDrawer.get;
92
+	if (options.sideMenu.left.shouldStretchDrawer.hasValue) {
93
+		sideMenu.shouldStretchLeftDrawer = options.sideMenu.left.shouldStretchDrawer.get;
95
 	}
94
 	}
96
 	
95
 	
97
-	if (newOptions.sideMenu.right.shouldStretchDrawer.hasValue) {
98
-		sideMenuController.shouldStretchRightDrawer = newOptions.sideMenu.right.shouldStretchDrawer.get;
96
+	if (options.sideMenu.right.shouldStretchDrawer.hasValue) {
97
+		sideMenu.shouldStretchRightDrawer = options.sideMenu.right.shouldStretchDrawer.get;
99
 	}
98
 	}
100
 	
99
 	
101
-	if (newOptions.sideMenu.left.animationVelocity.hasValue) {
102
-		sideMenuController.animationVelocityLeft = newOptions.sideMenu.left.animationVelocity.get;
100
+	if (options.sideMenu.left.animationVelocity.hasValue) {
101
+		sideMenu.animationVelocityLeft = options.sideMenu.left.animationVelocity.get;
103
 	}
102
 	}
104
 	
103
 	
105
-	if (newOptions.sideMenu.right.animationVelocity.hasValue) {
106
-		sideMenuController.animationVelocityRight = newOptions.sideMenu.right.animationVelocity.get;
104
+	if (options.sideMenu.right.animationVelocity.hasValue) {
105
+		sideMenu.animationVelocityRight = options.sideMenu.right.animationVelocity.get;
107
 	}
106
 	}
108
 	
107
 	
109
-	if (newOptions.sideMenu.animationType.hasValue) {
110
-		[sideMenuController setAnimationType:newOptions.sideMenu.animationType.get];
108
+	if (options.sideMenu.animationType.hasValue) {
109
+		[sideMenu setAnimationType:options.sideMenu.animationType.get];
111
 	}
110
 	}
112
 }
111
 }
113
 
112
 

+ 2
- 2
lib/ios/RNNSplitViewControllerPresenter.h View File

1
-#import "RNNViewControllerPresenter.h"
1
+#import "RNNComponentPresenter.h"
2
 
2
 
3
-@interface RNNSplitViewControllerPresenter : RNNViewControllerPresenter
3
+@interface RNNSplitViewControllerPresenter : RNNComponentPresenter
4
 
4
 
5
 @end
5
 @end

+ 10
- 10
lib/ios/RNNSplitViewControllerPresenter.m View File

31
 	[splitViewController rnn_setMaxWidth:initialOptions.splitView.maxWidth];
31
 	[splitViewController rnn_setMaxWidth:initialOptions.splitView.maxWidth];
32
 }
32
 }
33
 
33
 
34
-- (void)mergeOptions:(RNNNavigationOptions *)newOptions currentOptions:(RNNNavigationOptions *)currentOptions {
35
-	[super mergeOptions:newOptions currentOptions:currentOptions];
34
+- (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigationOptions *)currentOptions {
35
+    [super mergeOptions:options resolvedOptions:currentOptions];
36
 	
36
 	
37
 	UISplitViewController* splitViewController = self.boundViewController;
37
 	UISplitViewController* splitViewController = self.boundViewController;
38
 
38
 
39
-	if (newOptions.splitView.displayMode) {
40
-		[splitViewController rnn_setDisplayMode:newOptions.splitView.displayMode];
39
+	if (options.splitView.displayMode) {
40
+		[splitViewController rnn_setDisplayMode:options.splitView.displayMode];
41
 	}
41
 	}
42
-	if (newOptions.splitView.primaryEdge) {
43
-		[splitViewController rnn_setPrimaryEdge:newOptions.splitView.primaryEdge];
42
+	if (options.splitView.primaryEdge) {
43
+		[splitViewController rnn_setPrimaryEdge:options.splitView.primaryEdge];
44
 	}
44
 	}
45
-	if (newOptions.splitView.minWidth) {
46
-		[splitViewController rnn_setMinWidth:newOptions.splitView.minWidth];
45
+	if (options.splitView.minWidth) {
46
+		[splitViewController rnn_setMinWidth:options.splitView.minWidth];
47
 	}
47
 	}
48
-	if (newOptions.splitView.maxWidth) {
49
-		[splitViewController rnn_setMaxWidth:newOptions.splitView.maxWidth];
48
+	if (options.splitView.maxWidth) {
49
+		[splitViewController rnn_setMaxWidth:options.splitView.maxWidth];
50
 	}
50
 	}
51
 }
51
 }
52
 
52
 

+ 12
- 0
lib/ios/RNNStackController.h View File

1
+#import <UIKit/UIKit.h>
2
+#import "RNNStackPresenter.h"
3
+#import "UINavigationController+RNNOptions.h"
4
+#import "UIViewController+LayoutProtocol.h"
5
+
6
+@interface RNNStackController : UINavigationController <RNNLayoutProtocol>
7
+
8
+@property (nonatomic, retain) RNNStackPresenter* presenter;
9
+
10
+- (void)setTopBarBackgroundColor:(UIColor *)backgroundColor;
11
+
12
+@end

lib/ios/RNNNavigationController.m → lib/ios/RNNStackController.m View File

1
-#import "RNNNavigationController.h"
2
-#import "RNNRootViewController.h"
1
+#import "RNNStackController.h"
2
+#import "RNNComponentViewController.h"
3
 
3
 
4
 const NSInteger TOP_BAR_TRANSPARENT_TAG = 78264803;
4
 const NSInteger TOP_BAR_TRANSPARENT_TAG = 78264803;
5
 
5
 
6
-@implementation RNNNavigationController
6
+@implementation RNNStackController
7
 
7
 
8
 -(void)setDefaultOptions:(RNNNavigationOptions *)defaultOptions {
8
 -(void)setDefaultOptions:(RNNNavigationOptions *)defaultOptions {
9
 	[super setDefaultOptions:defaultOptions];
9
 	[super setDefaultOptions:defaultOptions];
38
 - (UIViewController *)popViewControllerAnimated:(BOOL)animated {
38
 - (UIViewController *)popViewControllerAnimated:(BOOL)animated {
39
 	if (self.viewControllers.count > 1) {
39
 	if (self.viewControllers.count > 1) {
40
 		UIViewController *controller = self.viewControllers[self.viewControllers.count - 2];
40
 		UIViewController *controller = self.viewControllers[self.viewControllers.count - 2];
41
-		if ([controller isKindOfClass:[RNNRootViewController class]]) {
42
-			RNNRootViewController *rnnController = (RNNRootViewController *)controller;
41
+		if ([controller isKindOfClass:[RNNComponentViewController class]]) {
42
+			RNNComponentViewController *rnnController = (RNNComponentViewController *)controller;
43
 			[self.presenter applyOptionsBeforePopping:rnnController.resolveOptions];
43
 			[self.presenter applyOptionsBeforePopping:rnnController.resolveOptions];
44
 		}
44
 		}
45
 	}
45
 	}

lib/ios/RNNNavigationControllerPresenter.h → lib/ios/RNNStackPresenter.h View File

1
 #import "RNNBasePresenter.h"
1
 #import "RNNBasePresenter.h"
2
-#import "RNNRootViewCreator.h"
2
+#import "RNNComponentViewCreator.h"
3
 #import "RNNReactComponentRegistry.h"
3
 #import "RNNReactComponentRegistry.h"
4
 #import "InteractivePopGestureDelegate.h"
4
 #import "InteractivePopGestureDelegate.h"
5
 
5
 
6
-@interface RNNNavigationControllerPresenter : RNNBasePresenter
6
+@interface RNNStackPresenter : RNNBasePresenter
7
 
7
 
8
 @property(nonatomic, strong) InteractivePopGestureDelegate *interactivePopGestureDelegate;
8
 @property(nonatomic, strong) InteractivePopGestureDelegate *interactivePopGestureDelegate;
9
 
9
 

+ 228
- 0
lib/ios/RNNStackPresenter.m View File

1
+#import "RNNStackPresenter.h"
2
+#import "UINavigationController+RNNOptions.h"
3
+#import "RNNStackController.h"
4
+#import "RNNCustomTitleView.h"
5
+
6
+@interface RNNStackPresenter() {
7
+	RNNReactComponentRegistry* _componentRegistry;
8
+	UIView* _customTopBar;
9
+	UIView* _customTopBarBackground;
10
+	RNNReactView* _customTopBarBackgroundReactView;
11
+}
12
+
13
+@end
14
+@implementation RNNStackPresenter
15
+
16
+- (instancetype)initWithComponentRegistry:(RNNReactComponentRegistry *)componentRegistry:(RNNNavigationOptions *)defaultOptions {
17
+	self = [super initWithDefaultOptions:defaultOptions];
18
+	_componentRegistry = componentRegistry;
19
+	return self;
20
+}
21
+
22
+- (void)applyOptions:(RNNNavigationOptions *)options {
23
+	[super applyOptions:options];
24
+	RNNStackController* stack = self.boundViewController;
25
+	RNNNavigationOptions * withDefault = [options withDefault:[self defaultOptions]];
26
+	
27
+	self.interactivePopGestureDelegate = [InteractivePopGestureDelegate new];
28
+	self.interactivePopGestureDelegate.navigationController = stack;
29
+	self.interactivePopGestureDelegate.originalDelegate = stack.interactivePopGestureRecognizer.delegate;
30
+	stack.interactivePopGestureRecognizer.delegate = self.interactivePopGestureDelegate;
31
+
32
+	[stack setInteractivePopGestureEnabled:[withDefault.popGesture getWithDefaultValue:YES]];
33
+	[stack setRootBackgroundImage:[withDefault.rootBackgroundImage getWithDefaultValue:nil]];
34
+	[stack setNavigationBarTestId:[withDefault.topBar.testID getWithDefaultValue:nil]];
35
+	[stack setNavigationBarVisible:[withDefault.topBar.visible getWithDefaultValue:YES] animated:[withDefault.topBar.animate getWithDefaultValue:YES]];
36
+	[stack hideBarsOnScroll:[withDefault.topBar.hideOnScroll getWithDefaultValue:NO]];
37
+	[stack setNavigationBarNoBorder:[withDefault.topBar.noBorder getWithDefaultValue:NO]];
38
+	[stack setBarStyle:[RCTConvert UIBarStyle:[withDefault.topBar.barStyle getWithDefaultValue:@"default"]]];
39
+	[stack setNavigationBarTranslucent:[withDefault.topBar.background.translucent getWithDefaultValue:NO]];
40
+	[stack setNavigationBarClipsToBounds:[withDefault.topBar.background.clipToBounds getWithDefaultValue:NO]];
41
+	[stack setNavigationBarBlur:[withDefault.topBar.background.blur getWithDefaultValue:NO]];
42
+	[stack setTopBarBackgroundColor:[withDefault.topBar.background.color getWithDefaultValue:nil]];
43
+	[stack setNavigationBarLargeTitleVisible:[withDefault.topBar.largeTitle.visible getWithDefaultValue:NO]];
44
+	[stack setNavigationBarLargeTitleFontFamily:[withDefault.topBar.largeTitle.fontFamily getWithDefaultValue:nil] fontSize:[withDefault.topBar.largeTitle.fontSize getWithDefaultValue:nil] color:[withDefault.topBar.largeTitle.color getWithDefaultValue:nil]];
45
+	[stack setNavigationBarFontFamily:[withDefault.topBar.title.fontFamily getWithDefaultValue:nil] fontSize:[withDefault.topBar.title.fontSize getWithDefaultValue:nil] color:[withDefault.topBar.title.color getWithDefaultValue:nil]];
46
+	[stack setBackButtonColor:[withDefault.topBar.backButton.color getWithDefaultValue:nil]];
47
+}
48
+
49
+- (void)applyOptionsOnViewDidLayoutSubviews:(RNNNavigationOptions *)options {
50
+	RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
51
+	if (withDefault.topBar.background.component.name.hasValue) {
52
+		[self presentBackgroundComponent];
53
+	}
54
+}
55
+
56
+- (void)applyOptionsBeforePopping:(RNNNavigationOptions *)options {
57
+	RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
58
+	RNNStackController* navigationController = self.boundViewController;
59
+	[navigationController setTopBarBackgroundColor:[withDefault.topBar.background.color getWithDefaultValue:nil]];
60
+	[navigationController setNavigationBarFontFamily:[withDefault.topBar.title.fontFamily getWithDefaultValue:nil] fontSize:[withDefault.topBar.title.fontSize getWithDefaultValue:nil] color:[withDefault.topBar.title.color getWithDefaultValue:[UIColor blackColor]]];
61
+	[navigationController setNavigationBarLargeTitleVisible:[withDefault.topBar.largeTitle.visible getWithDefaultValue:NO]];
62
+}
63
+
64
+- (void)mergeOptions:(RNNNavigationOptions *)options resolvedOptions:(RNNNavigationOptions *)resolvedOptions {
65
+    [super mergeOptions:options resolvedOptions:resolvedOptions];
66
+	RNNStackController* stack = self.boundViewController;
67
+
68
+	if (options.popGesture.hasValue) {
69
+		[stack setInteractivePopGestureEnabled:options.popGesture.get];
70
+	}
71
+	
72
+	if (options.rootBackgroundImage.hasValue) {
73
+		[stack setRootBackgroundImage:options.rootBackgroundImage.get];
74
+	}
75
+	
76
+	if (options.topBar.testID.hasValue) {
77
+		[stack setNavigationBarTestId:options.topBar.testID.get];
78
+	}
79
+	
80
+	if (options.topBar.visible.hasValue) {
81
+		[stack setNavigationBarVisible:options.topBar.visible.get animated:[options.topBar.animate getWithDefaultValue:YES]];
82
+	}
83
+	
84
+	if (options.topBar.hideOnScroll.hasValue) {
85
+		[stack hideBarsOnScroll:[options.topBar.hideOnScroll get]];
86
+	}
87
+	
88
+	if (options.topBar.noBorder.hasValue) {
89
+		[stack setNavigationBarNoBorder:[options.topBar.noBorder get]];
90
+	}
91
+	
92
+	if (options.topBar.barStyle.hasValue) {
93
+		[stack setBarStyle:[RCTConvert UIBarStyle:options.topBar.barStyle.get]];
94
+	}
95
+	
96
+	if (options.topBar.background.translucent.hasValue) {
97
+		[stack setNavigationBarTranslucent:[options.topBar.background.translucent get]];
98
+	}
99
+	
100
+	if (options.topBar.background.clipToBounds.hasValue) {
101
+		[stack setNavigationBarClipsToBounds:[options.topBar.background.clipToBounds get]];
102
+	}
103
+	
104
+	if (options.topBar.background.blur.hasValue) {
105
+		[stack setNavigationBarBlur:[options.topBar.background.blur get]];
106
+	}
107
+	
108
+	if (options.topBar.background.color.hasValue) {
109
+		[stack setTopBarBackgroundColor:options.topBar.background.color.get];
110
+	}
111
+	
112
+	if (options.topBar.largeTitle.visible.hasValue) {
113
+		[stack setNavigationBarLargeTitleVisible:options.topBar.largeTitle.visible.get];
114
+	}
115
+	
116
+	if (options.topBar.backButton.color.hasValue) {
117
+		[stack setBackButtonColor:options.topBar.backButton.color.get];
118
+	}
119
+
120
+	RNNLargeTitleOptions *largeTitleOptions = options.topBar.largeTitle;
121
+	if (largeTitleOptions.color.hasValue || largeTitleOptions.fontSize.hasValue || largeTitleOptions.fontFamily.hasValue) {
122
+		[stack setNavigationBarLargeTitleFontFamily:[options.topBar.largeTitle.fontFamily getWithDefaultValue:nil] fontSize:[options.topBar.largeTitle.fontSize getWithDefaultValue:nil] color:[options.topBar.largeTitle.color getWithDefaultValue:nil]];
123
+	}
124
+
125
+	RNNNavigationOptions * withDefault = (RNNNavigationOptions *) [[options mergeInOptions:resolvedOptions] withDefault:[self defaultOptions]];
126
+	[stack setNavigationBarFontFamily:[withDefault.topBar.title.fontFamily getWithDefaultValue:nil]
127
+							 fontSize:[withDefault.topBar.title.fontSize getWithDefaultValue:nil]
128
+								color:[withDefault.topBar.title.color getWithDefaultValue:nil]];
129
+	
130
+	if (options.topBar.component.name.hasValue) {
131
+		[self setCustomNavigationBarView:options perform:nil];
132
+	}
133
+	
134
+	if (options.topBar.background.component.name.hasValue) {
135
+		[self setCustomNavigationComponentBackground:options perform:nil];
136
+	}
137
+}
138
+
139
+- (void)renderComponents:(RNNNavigationOptions *)options perform:(RNNReactViewReadyCompletionBlock)readyBlock {
140
+	dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
141
+		dispatch_group_t group = dispatch_group_create();
142
+		
143
+		dispatch_group_enter(group);
144
+		dispatch_async(dispatch_get_main_queue(), ^{
145
+			[self setCustomNavigationBarView:options perform:^{
146
+				dispatch_group_leave(group);
147
+			}];
148
+		});
149
+		
150
+		dispatch_group_enter(group);
151
+		dispatch_async(dispatch_get_main_queue(), ^{
152
+			[self setCustomNavigationComponentBackground:options perform:^{
153
+				dispatch_group_leave(group);
154
+			}];
155
+		});
156
+		
157
+		dispatch_group_wait(group, DISPATCH_TIME_FOREVER);
158
+		
159
+		dispatch_async(dispatch_get_main_queue(), ^{
160
+			if (readyBlock) {
161
+				readyBlock();
162
+			}
163
+		});
164
+	});
165
+}
166
+
167
+- (void)setCustomNavigationBarView:(RNNNavigationOptions *)options perform:(RNNReactViewReadyCompletionBlock)readyBlock {
168
+	RNNStackController* stack = self.boundViewController;
169
+	if (![options.topBar.component.waitForRender getWithDefaultValue:NO] && readyBlock) {
170
+		readyBlock();
171
+		readyBlock = nil;
172
+	}
173
+	if (options.topBar.component.name.hasValue) {
174
+		NSString* currentChildComponentId = [stack getCurrentChild].layoutInfo.componentId;
175
+		RCTRootView *reactView = [_componentRegistry createComponentIfNotExists:options.topBar.component parentComponentId:currentChildComponentId reactViewReadyBlock:readyBlock];
176
+		
177
+		if (_customTopBar) {
178
+			[_customTopBar removeFromSuperview];
179
+		}
180
+		_customTopBar = [[RNNCustomTitleView alloc] initWithFrame:stack.navigationBar.bounds subView:reactView alignment:@"fill"];
181
+		reactView.backgroundColor = UIColor.clearColor;
182
+		_customTopBar.backgroundColor = UIColor.clearColor;
183
+		[stack.navigationBar addSubview:_customTopBar];
184
+	} else {
185
+		[_customTopBar removeFromSuperview];
186
+		_customTopBar = nil;
187
+		if (readyBlock) {
188
+			readyBlock();
189
+		}
190
+	}
191
+}
192
+
193
+- (void)setCustomNavigationComponentBackground:(RNNNavigationOptions *)options perform:(RNNReactViewReadyCompletionBlock)readyBlock {
194
+	RNNStackController* stack = self.boundViewController;
195
+	if (![options.topBar.background.component.waitForRender getWithDefaultValue:NO] && readyBlock) {
196
+		readyBlock();
197
+		readyBlock = nil;
198
+	}
199
+	if (options.topBar.background.component.name.hasValue) {
200
+		NSString* currentChildComponentId = [stack getCurrentChild].layoutInfo.componentId;
201
+		RNNReactView *reactView = [_componentRegistry createComponentIfNotExists:options.topBar.background.component parentComponentId:currentChildComponentId reactViewReadyBlock:readyBlock];
202
+		_customTopBarBackgroundReactView = reactView;
203
+		
204
+	} else {
205
+		[_customTopBarBackground removeFromSuperview];
206
+		_customTopBarBackground = nil;
207
+		if (readyBlock) {
208
+			readyBlock();
209
+		}
210
+	}
211
+}
212
+
213
+- (void)presentBackgroundComponent {
214
+	RNNStackController* stack = self.boundViewController;
215
+	if (_customTopBarBackground) {
216
+		[_customTopBarBackground removeFromSuperview];
217
+	}
218
+	RNNCustomTitleView* customTopBarBackground = [[RNNCustomTitleView alloc] initWithFrame:stack.navigationBar.bounds subView:_customTopBarBackgroundReactView alignment:@"fill"];
219
+	_customTopBarBackground = customTopBarBackground;
220
+	
221
+	[stack.navigationBar insertSubview:_customTopBarBackground atIndex:1];
222
+}
223
+
224
+- (void)dealloc {
225
+	[_componentRegistry removeComponent:self.boundComponentId];
226
+}
227
+
228
+@end

+ 0
- 82
lib/ios/RNNTabBarPresenter.m View File

1
-#import "RNNTabBarPresenter.h"
2
-#import "UITabBarController+RNNOptions.h"
3
-#import "UIViewController+LayoutProtocol.h"
4
-#import "UIViewController+Utils.h"
5
-
6
-@implementation RNNTabBarPresenter
7
-
8
-- (void)applyOptionsOnInit:(RNNNavigationOptions *)options {
9
-    UITabBarController *tabBarController = self.boundViewController;
10
-    RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
11
-    [tabBarController rnn_setCurrentTabIndex:[withDefault.bottomTabs.currentTabIndex getWithDefaultValue:0]];
12
-}
13
-
14
-- (void)applyOptions:(RNNNavigationOptions *)options {
15
-    UITabBarController *tabBarController = self.boundViewController;
16
-    RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
17
-
18
-    [tabBarController rnn_setTabBarTestID:[withDefault.bottomTabs.testID getWithDefaultValue:nil]];
19
-    [tabBarController rnn_setTabBarBackgroundColor:[withDefault.bottomTabs.backgroundColor getWithDefaultValue:nil]];
20
-    [tabBarController rnn_setTabBarTranslucent:[withDefault.bottomTabs.translucent getWithDefaultValue:NO]];
21
-    [tabBarController rnn_setTabBarHideShadow:[withDefault.bottomTabs.hideShadow getWithDefaultValue:NO]];
22
-    [tabBarController rnn_setTabBarStyle:[RCTConvert UIBarStyle:[withDefault.bottomTabs.barStyle getWithDefaultValue:@"default"]]];
23
-    [tabBarController rnn_setTabBarVisible:[withDefault.bottomTabs.visible getWithDefaultValue:YES] animated:[withDefault.bottomTabs.animate getWithDefaultValue:NO]];
24
-}
25
-
26
-- (void)mergeOptions:(RNNNavigationOptions *)newOptions currentOptions:(RNNNavigationOptions *)currentOptions {
27
-    [super mergeOptions:newOptions currentOptions:currentOptions];
28
-
29
-    UITabBarController *tabBarController = self.boundViewController;
30
-
31
-    if (newOptions.bottomTabs.currentTabIndex.hasValue) {
32
-        [tabBarController rnn_setCurrentTabIndex:newOptions.bottomTabs.currentTabIndex.get];
33
-        [newOptions.bottomTabs.currentTabIndex consume];
34
-    }
35
-
36
-    if (newOptions.bottomTabs.currentTabId.hasValue) {
37
-        [tabBarController rnn_setCurrentTabID:newOptions.bottomTabs.currentTabId.get];
38
-        [newOptions.bottomTabs.currentTabId consume];
39
-    }
40
-
41
-    if (newOptions.bottomTabs.testID.hasValue) {
42
-        [tabBarController rnn_setTabBarTestID:newOptions.bottomTabs.testID.get];
43
-    }
44
-
45
-    if (newOptions.bottomTabs.backgroundColor.hasValue) {
46
-        [tabBarController rnn_setTabBarBackgroundColor:newOptions.bottomTabs.backgroundColor.get];
47
-    }
48
-
49
-    if (newOptions.bottomTabs.barStyle.hasValue) {
50
-        [tabBarController rnn_setTabBarStyle:[RCTConvert UIBarStyle:newOptions.bottomTabs.barStyle.get]];
51
-    }
52
-
53
-    if (newOptions.bottomTabs.translucent.hasValue) {
54
-        [tabBarController rnn_setTabBarTranslucent:newOptions.bottomTabs.translucent.get];
55
-    }
56
-
57
-    if (newOptions.bottomTabs.hideShadow.hasValue) {
58
-        [tabBarController rnn_setTabBarHideShadow:newOptions.bottomTabs.hideShadow.get];
59
-    }
60
-
61
-    if (newOptions.bottomTabs.visible.hasValue) {
62
-        if (newOptions.bottomTabs.animate.hasValue) {
63
-            [tabBarController rnn_setTabBarVisible:newOptions.bottomTabs.visible.get animated:[newOptions.bottomTabs.animate getWithDefaultValue:NO]];
64
-        } else {
65
-            [tabBarController rnn_setTabBarVisible:newOptions.bottomTabs.visible.get animated:NO];
66
-        }
67
-    }
68
-}
69
-
70
-- (void)viewDidLayoutSubviews {
71
-    dispatch_async(dispatch_get_main_queue(), ^{
72
-        [self applyDotIndicator];
73
-    });
74
-}
75
-
76
-- (void)applyDotIndicator {
77
-    [self.boundViewController forEachChild:^(UIViewController *child) {
78
-        [self applyDotIndicator:child];
79
-    }];
80
-}
81
-
82
-@end

+ 2
- 2
lib/ios/RNNTopTabsViewController.m View File

1
 #import "RNNTopTabsViewController.h"
1
 #import "RNNTopTabsViewController.h"
2
 #import "RNNSegmentedControl.h"
2
 #import "RNNSegmentedControl.h"
3
 #import "ReactNativeNavigation.h"
3
 #import "ReactNativeNavigation.h"
4
-#import "RNNRootViewController.h"
4
+#import "RNNComponentViewController.h"
5
 #import "UIViewController+LayoutProtocol.h"
5
 #import "UIViewController+LayoutProtocol.h"
6
 
6
 
7
 @interface RNNTopTabsViewController () {
7
 @interface RNNTopTabsViewController () {
60
 
60
 
61
 - (void)setViewControllers:(NSArray *)viewControllers {
61
 - (void)setViewControllers:(NSArray *)viewControllers {
62
 	_viewControllers = viewControllers;
62
 	_viewControllers = viewControllers;
63
-	for (RNNRootViewController* childVc in viewControllers) {
63
+	for (RNNComponentViewController* childVc in viewControllers) {
64
 		[childVc.view setFrame:_contentView.bounds];
64
 		[childVc.view setFrame:_contentView.bounds];
65
 //		[childVc.options.topTab applyOn:childVc];
65
 //		[childVc.options.topTab applyOn:childVc];
66
 		[self addChildViewController:childVc];
66
 		[self addChildViewController:childVc];

+ 56
- 56
lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj View File

50
 		4534E72520CB6724009F8185 /* RNNLargeTitleOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4534E72320CB6724009F8185 /* RNNLargeTitleOptions.h */; };
50
 		4534E72520CB6724009F8185 /* RNNLargeTitleOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4534E72320CB6724009F8185 /* RNNLargeTitleOptions.h */; };
51
 		4534E72620CB6724009F8185 /* RNNLargeTitleOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4534E72420CB6724009F8185 /* RNNLargeTitleOptions.m */; };
51
 		4534E72620CB6724009F8185 /* RNNLargeTitleOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4534E72420CB6724009F8185 /* RNNLargeTitleOptions.m */; };
52
 		501214C9217741A000435148 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 501214C8217741A000435148 /* libOCMock.a */; };
52
 		501214C9217741A000435148 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 501214C8217741A000435148 /* libOCMock.a */; };
53
-		501223D72173590F000F5F98 /* RNNNavigationControllerPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 501223D52173590F000F5F98 /* RNNNavigationControllerPresenter.h */; };
54
-		501223D82173590F000F5F98 /* RNNNavigationControllerPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 501223D62173590F000F5F98 /* RNNNavigationControllerPresenter.m */; };
55
-		501224062173592D000F5F98 /* RNNTabBarPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 501224042173592D000F5F98 /* RNNTabBarPresenter.h */; };
56
-		501224072173592D000F5F98 /* RNNTabBarPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 501224052173592D000F5F98 /* RNNTabBarPresenter.m */; };
53
+		501223D72173590F000F5F98 /* RNNStackPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 501223D52173590F000F5F98 /* RNNStackPresenter.h */; };
54
+		501223D82173590F000F5F98 /* RNNStackPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 501223D62173590F000F5F98 /* RNNStackPresenter.m */; };
55
+		501224062173592D000F5F98 /* RNNBottomTabsPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 501224042173592D000F5F98 /* RNNBottomTabsPresenter.h */; };
56
+		501224072173592D000F5F98 /* RNNBottomTabsPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 501224052173592D000F5F98 /* RNNBottomTabsPresenter.m */; };
57
 		5012240A21735959000F5F98 /* RNNSideMenuPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5012240821735959000F5F98 /* RNNSideMenuPresenter.h */; };
57
 		5012240A21735959000F5F98 /* RNNSideMenuPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5012240821735959000F5F98 /* RNNSideMenuPresenter.h */; };
58
 		5012240B21735959000F5F98 /* RNNSideMenuPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5012240921735959000F5F98 /* RNNSideMenuPresenter.m */; };
58
 		5012240B21735959000F5F98 /* RNNSideMenuPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 5012240921735959000F5F98 /* RNNSideMenuPresenter.m */; };
59
 		5012240E21735999000F5F98 /* RNNBasePresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5012240C21735999000F5F98 /* RNNBasePresenter.h */; };
59
 		5012240E21735999000F5F98 /* RNNBasePresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 5012240C21735999000F5F98 /* RNNBasePresenter.h */; };
167
 		505963F722676A0000EBB63C /* RNNLayoutManagerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 505963F622676A0000EBB63C /* RNNLayoutManagerTest.m */; };
167
 		505963F722676A0000EBB63C /* RNNLayoutManagerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 505963F622676A0000EBB63C /* RNNLayoutManagerTest.m */; };
168
 		505EDD32214E4BE80071C7DE /* RNNNavigationControllerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 505EDD31214E4BE80071C7DE /* RNNNavigationControllerTest.m */; };
168
 		505EDD32214E4BE80071C7DE /* RNNNavigationControllerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 505EDD31214E4BE80071C7DE /* RNNNavigationControllerTest.m */; };
169
 		505EDD34214E7B7B0071C7DE /* RNNLeafProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 505EDD33214E7A6A0071C7DE /* RNNLeafProtocol.h */; };
169
 		505EDD34214E7B7B0071C7DE /* RNNLeafProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 505EDD33214E7A6A0071C7DE /* RNNLeafProtocol.h */; };
170
-		505EDD3C214FA8000071C7DE /* RNNViewControllerPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 505EDD3A214FA8000071C7DE /* RNNViewControllerPresenter.h */; };
171
-		505EDD3D214FA8000071C7DE /* RNNViewControllerPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 505EDD3B214FA8000071C7DE /* RNNViewControllerPresenter.m */; };
170
+		505EDD3C214FA8000071C7DE /* RNNComponentPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 505EDD3A214FA8000071C7DE /* RNNComponentPresenter.h */; };
171
+		505EDD3D214FA8000071C7DE /* RNNComponentPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 505EDD3B214FA8000071C7DE /* RNNComponentPresenter.m */; };
172
 		505EDD4A214FDA800071C7DE /* RCTConvert+Modal.h in Headers */ = {isa = PBXBuildFile; fileRef = 505EDD48214FDA800071C7DE /* RCTConvert+Modal.h */; };
172
 		505EDD4A214FDA800071C7DE /* RCTConvert+Modal.h in Headers */ = {isa = PBXBuildFile; fileRef = 505EDD48214FDA800071C7DE /* RCTConvert+Modal.h */; };
173
 		5060DE73219DAD7E00D0C052 /* ReactNativeNavigation.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BA500731E2544B9001B9E1B /* ReactNativeNavigation.h */; };
173
 		5060DE73219DAD7E00D0C052 /* ReactNativeNavigation.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BA500731E2544B9001B9E1B /* ReactNativeNavigation.h */; };
174
 		5060DE74219DAD8300D0C052 /* RNNBridgeManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 502CB43920CBCA140019B2FE /* RNNBridgeManagerDelegate.h */; };
174
 		5060DE74219DAD8300D0C052 /* RNNBridgeManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 502CB43920CBCA140019B2FE /* RNNBridgeManagerDelegate.h */; };
203
 		50887CAA20F26BFE00D06111 /* RNNOverlayWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 50887CA820F26BFE00D06111 /* RNNOverlayWindow.h */; };
203
 		50887CAA20F26BFE00D06111 /* RNNOverlayWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 50887CA820F26BFE00D06111 /* RNNOverlayWindow.h */; };
204
 		508EBDBD2278746400BEC144 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 508EBDBA2278742700BEC144 /* JavaScriptCore.framework */; };
204
 		508EBDBD2278746400BEC144 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 508EBDBA2278742700BEC144 /* JavaScriptCore.framework */; };
205
 		509B2480217873FF00C83C23 /* UINavigationController+RNNOptionsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 509B247F217873FF00C83C23 /* UINavigationController+RNNOptionsTest.m */; };
205
 		509B2480217873FF00C83C23 /* UINavigationController+RNNOptionsTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 509B247F217873FF00C83C23 /* UINavigationController+RNNOptionsTest.m */; };
206
-		509B258F2178BE7A00C83C23 /* RNNNavigationControllerPresenterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 509B258E2178BE7A00C83C23 /* RNNNavigationControllerPresenterTest.m */; };
206
+		509B258F2178BE7A00C83C23 /* RNNStackPresenterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 509B258E2178BE7A00C83C23 /* RNNStackPresenterTest.m */; };
207
 		50A00C37200F84D6000F01A6 /* RNNOverlayOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 50A00C35200F84D6000F01A6 /* RNNOverlayOptions.h */; };
207
 		50A00C37200F84D6000F01A6 /* RNNOverlayOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 50A00C35200F84D6000F01A6 /* RNNOverlayOptions.h */; };
208
 		50A00C38200F84D6000F01A6 /* RNNOverlayOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50A00C36200F84D6000F01A6 /* RNNOverlayOptions.m */; };
208
 		50A00C38200F84D6000F01A6 /* RNNOverlayOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50A00C36200F84D6000F01A6 /* RNNOverlayOptions.m */; };
209
 		50AB0B1C2255F8640039DAED /* UIViewController+LayoutProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 50AB0B1A2255F8640039DAED /* UIViewController+LayoutProtocol.h */; };
209
 		50AB0B1C2255F8640039DAED /* UIViewController+LayoutProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 50AB0B1A2255F8640039DAED /* UIViewController+LayoutProtocol.h */; };
233
 		50EB4ED72068EBE000D6ED34 /* RNNBackgroundOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 50EB4ED52068EBE000D6ED34 /* RNNBackgroundOptions.h */; };
233
 		50EB4ED72068EBE000D6ED34 /* RNNBackgroundOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 50EB4ED52068EBE000D6ED34 /* RNNBackgroundOptions.h */; };
234
 		50EB4ED82068EBE000D6ED34 /* RNNBackgroundOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50EB4ED62068EBE000D6ED34 /* RNNBackgroundOptions.m */; };
234
 		50EB4ED82068EBE000D6ED34 /* RNNBackgroundOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50EB4ED62068EBE000D6ED34 /* RNNBackgroundOptions.m */; };
235
 		50EB93421FE14A3E00BD8EEE /* RNNBottomTabOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50EB93401FE14A3E00BD8EEE /* RNNBottomTabOptions.m */; };
235
 		50EB93421FE14A3E00BD8EEE /* RNNBottomTabOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 50EB93401FE14A3E00BD8EEE /* RNNBottomTabOptions.m */; };
236
-		50F5DFC11F407A8C001A00BC /* RNNTabBarController.h in Headers */ = {isa = PBXBuildFile; fileRef = 50F5DFBF1F407A8C001A00BC /* RNNTabBarController.h */; };
237
-		50F5DFC21F407A8C001A00BC /* RNNTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 50F5DFC01F407A8C001A00BC /* RNNTabBarController.m */; };
238
-		50F5DFC51F407AA0001A00BC /* RNNNavigationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 50F5DFC31F407AA0001A00BC /* RNNNavigationController.h */; };
239
-		50F5DFC61F407AA0001A00BC /* RNNNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 50F5DFC41F407AA0001A00BC /* RNNNavigationController.m */; };
236
+		50F5DFC11F407A8C001A00BC /* RNNBottomTabsController.h in Headers */ = {isa = PBXBuildFile; fileRef = 50F5DFBF1F407A8C001A00BC /* RNNBottomTabsController.h */; };
237
+		50F5DFC21F407A8C001A00BC /* RNNBottomTabsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 50F5DFC01F407A8C001A00BC /* RNNBottomTabsController.m */; };
238
+		50F5DFC51F407AA0001A00BC /* RNNStackController.h in Headers */ = {isa = PBXBuildFile; fileRef = 50F5DFC31F407AA0001A00BC /* RNNStackController.h */; };
239
+		50F5DFC61F407AA0001A00BC /* RNNStackController.m in Sources */ = {isa = PBXBuildFile; fileRef = 50F5DFC41F407AA0001A00BC /* RNNStackController.m */; };
240
 		651E1F8A21FD624600DFEA19 /* UISplitViewController+RNNOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 651E1F8921FD624600DFEA19 /* UISplitViewController+RNNOptions.m */; };
240
 		651E1F8A21FD624600DFEA19 /* UISplitViewController+RNNOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 651E1F8921FD624600DFEA19 /* UISplitViewController+RNNOptions.m */; };
241
 		651E1F8D21FD642100DFEA19 /* RNNSplitViewControllerPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 651E1F8C21FD642100DFEA19 /* RNNSplitViewControllerPresenter.m */; };
241
 		651E1F8D21FD642100DFEA19 /* RNNSplitViewControllerPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 651E1F8C21FD642100DFEA19 /* RNNSplitViewControllerPresenter.m */; };
242
 		7365071121E4B16F004E020F /* RCTConvert+UIBarButtonSystemItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 7365070F21E4B16F004E020F /* RCTConvert+UIBarButtonSystemItem.h */; };
242
 		7365071121E4B16F004E020F /* RCTConvert+UIBarButtonSystemItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 7365070F21E4B16F004E020F /* RCTConvert+UIBarButtonSystemItem.h */; };
270
 		7BA500781E254908001B9E1B /* RNNSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BA500771E254908001B9E1B /* RNNSplashScreen.m */; };
270
 		7BA500781E254908001B9E1B /* RNNSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BA500771E254908001B9E1B /* RNNSplashScreen.m */; };
271
 		7BBFE5441E25330E002A6182 /* RNNBridgeModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BBFE5431E25330E002A6182 /* RNNBridgeModule.m */; };
271
 		7BBFE5441E25330E002A6182 /* RNNBridgeModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BBFE5431E25330E002A6182 /* RNNBridgeModule.m */; };
272
 		7BC9346E1E26886E00EFA125 /* RNNControllerFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BC9346D1E26886E00EFA125 /* RNNControllerFactory.m */; };
272
 		7BC9346E1E26886E00EFA125 /* RNNControllerFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BC9346D1E26886E00EFA125 /* RNNControllerFactory.m */; };
273
-		7BEF0D181E437684003E96B0 /* RNNRootViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BEF0D161E437684003E96B0 /* RNNRootViewController.h */; };
274
-		7BEF0D191E437684003E96B0 /* RNNRootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BEF0D171E437684003E96B0 /* RNNRootViewController.m */; };
273
+		7BEF0D181E437684003E96B0 /* RNNComponentViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BEF0D161E437684003E96B0 /* RNNComponentViewController.h */; };
274
+		7BEF0D191E437684003E96B0 /* RNNComponentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BEF0D171E437684003E96B0 /* RNNComponentViewController.m */; };
275
 		7BEF0D1C1E43771B003E96B0 /* RNNLayoutNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BEF0D1A1E43771B003E96B0 /* RNNLayoutNode.h */; };
275
 		7BEF0D1C1E43771B003E96B0 /* RNNLayoutNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BEF0D1A1E43771B003E96B0 /* RNNLayoutNode.h */; };
276
 		7BEF0D1D1E43771B003E96B0 /* RNNLayoutNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BEF0D1B1E43771B003E96B0 /* RNNLayoutNode.m */; };
276
 		7BEF0D1D1E43771B003E96B0 /* RNNLayoutNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BEF0D1B1E43771B003E96B0 /* RNNLayoutNode.m */; };
277
 		A7626BFD1FC2FB2C00492FB8 /* RNNTopBarOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = A7626BFC1FC2FB2C00492FB8 /* RNNTopBarOptions.m */; };
277
 		A7626BFD1FC2FB2C00492FB8 /* RNNTopBarOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = A7626BFC1FC2FB2C00492FB8 /* RNNTopBarOptions.m */; };
372
 		263905D51E4C94970023D7D3 /* RNNSideMenuController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNSideMenuController.m; sourceTree = "<group>"; };
372
 		263905D51E4C94970023D7D3 /* RNNSideMenuController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNSideMenuController.m; sourceTree = "<group>"; };
373
 		263905E41E4CAC950023D7D3 /* RNNSideMenuChildVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNSideMenuChildVC.h; sourceTree = "<group>"; };
373
 		263905E41E4CAC950023D7D3 /* RNNSideMenuChildVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNSideMenuChildVC.h; sourceTree = "<group>"; };
374
 		263905E51E4CAC950023D7D3 /* RNNSideMenuChildVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNSideMenuChildVC.m; sourceTree = "<group>"; };
374
 		263905E51E4CAC950023D7D3 /* RNNSideMenuChildVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNSideMenuChildVC.m; sourceTree = "<group>"; };
375
-		26916C941E4B9CCC00D13680 /* RNNRootViewCreator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNRootViewCreator.h; sourceTree = "<group>"; };
375
+		26916C941E4B9CCC00D13680 /* RNNComponentViewCreator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNComponentViewCreator.h; sourceTree = "<group>"; };
376
 		26916C961E4B9E7700D13680 /* RNNReactRootViewCreator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNReactRootViewCreator.h; sourceTree = "<group>"; };
376
 		26916C961E4B9E7700D13680 /* RNNReactRootViewCreator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNReactRootViewCreator.h; sourceTree = "<group>"; };
377
 		26916C971E4B9E7700D13680 /* RNNReactRootViewCreator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNReactRootViewCreator.m; sourceTree = "<group>"; };
377
 		26916C971E4B9E7700D13680 /* RNNReactRootViewCreator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNReactRootViewCreator.m; sourceTree = "<group>"; };
378
 		2DCD9193200014A900EDC75D /* RNNBridgeManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBridgeManager.h; sourceTree = "<group>"; };
378
 		2DCD9193200014A900EDC75D /* RNNBridgeManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBridgeManager.h; sourceTree = "<group>"; };
398
 		4534E72320CB6724009F8185 /* RNNLargeTitleOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNLargeTitleOptions.h; sourceTree = "<group>"; };
398
 		4534E72320CB6724009F8185 /* RNNLargeTitleOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNLargeTitleOptions.h; sourceTree = "<group>"; };
399
 		4534E72420CB6724009F8185 /* RNNLargeTitleOptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNLargeTitleOptions.m; sourceTree = "<group>"; };
399
 		4534E72420CB6724009F8185 /* RNNLargeTitleOptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNLargeTitleOptions.m; sourceTree = "<group>"; };
400
 		501214C8217741A000435148 /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libOCMock.a; sourceTree = "<group>"; };
400
 		501214C8217741A000435148 /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libOCMock.a; sourceTree = "<group>"; };
401
-		501223D52173590F000F5F98 /* RNNNavigationControllerPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNNavigationControllerPresenter.h; sourceTree = "<group>"; };
402
-		501223D62173590F000F5F98 /* RNNNavigationControllerPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNNavigationControllerPresenter.m; sourceTree = "<group>"; };
403
-		501224042173592D000F5F98 /* RNNTabBarPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNTabBarPresenter.h; sourceTree = "<group>"; };
404
-		501224052173592D000F5F98 /* RNNTabBarPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNTabBarPresenter.m; sourceTree = "<group>"; };
401
+		501223D52173590F000F5F98 /* RNNStackPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNStackPresenter.h; sourceTree = "<group>"; };
402
+		501223D62173590F000F5F98 /* RNNStackPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNStackPresenter.m; sourceTree = "<group>"; };
403
+		501224042173592D000F5F98 /* RNNBottomTabsPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBottomTabsPresenter.h; sourceTree = "<group>"; };
404
+		501224052173592D000F5F98 /* RNNBottomTabsPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBottomTabsPresenter.m; sourceTree = "<group>"; };
405
 		5012240821735959000F5F98 /* RNNSideMenuPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNSideMenuPresenter.h; sourceTree = "<group>"; };
405
 		5012240821735959000F5F98 /* RNNSideMenuPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNSideMenuPresenter.h; sourceTree = "<group>"; };
406
 		5012240921735959000F5F98 /* RNNSideMenuPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNSideMenuPresenter.m; sourceTree = "<group>"; };
406
 		5012240921735959000F5F98 /* RNNSideMenuPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNSideMenuPresenter.m; sourceTree = "<group>"; };
407
 		5012240C21735999000F5F98 /* RNNBasePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBasePresenter.h; sourceTree = "<group>"; };
407
 		5012240C21735999000F5F98 /* RNNBasePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBasePresenter.h; sourceTree = "<group>"; };
515
 		505963F622676A0000EBB63C /* RNNLayoutManagerTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNLayoutManagerTest.m; sourceTree = "<group>"; };
515
 		505963F622676A0000EBB63C /* RNNLayoutManagerTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNLayoutManagerTest.m; sourceTree = "<group>"; };
516
 		505EDD31214E4BE80071C7DE /* RNNNavigationControllerTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNNavigationControllerTest.m; sourceTree = "<group>"; };
516
 		505EDD31214E4BE80071C7DE /* RNNNavigationControllerTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNNavigationControllerTest.m; sourceTree = "<group>"; };
517
 		505EDD33214E7A6A0071C7DE /* RNNLeafProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNLeafProtocol.h; sourceTree = "<group>"; };
517
 		505EDD33214E7A6A0071C7DE /* RNNLeafProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNLeafProtocol.h; sourceTree = "<group>"; };
518
-		505EDD3A214FA8000071C7DE /* RNNViewControllerPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNViewControllerPresenter.h; sourceTree = "<group>"; };
519
-		505EDD3B214FA8000071C7DE /* RNNViewControllerPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNViewControllerPresenter.m; sourceTree = "<group>"; };
518
+		505EDD3A214FA8000071C7DE /* RNNComponentPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNComponentPresenter.h; sourceTree = "<group>"; };
519
+		505EDD3B214FA8000071C7DE /* RNNComponentPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNComponentPresenter.m; sourceTree = "<group>"; };
520
 		505EDD47214FC4A60071C7DE /* RNNLayoutProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNLayoutProtocol.h; sourceTree = "<group>"; };
520
 		505EDD47214FC4A60071C7DE /* RNNLayoutProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNLayoutProtocol.h; sourceTree = "<group>"; };
521
 		505EDD48214FDA800071C7DE /* RCTConvert+Modal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RCTConvert+Modal.h"; sourceTree = "<group>"; };
521
 		505EDD48214FDA800071C7DE /* RCTConvert+Modal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RCTConvert+Modal.h"; sourceTree = "<group>"; };
522
 		506317A8220B547400B26FC3 /* UIImage+insets.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIImage+insets.h"; sourceTree = "<group>"; };
522
 		506317A8220B547400B26FC3 /* UIImage+insets.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIImage+insets.h"; sourceTree = "<group>"; };
550
 		50887CA820F26BFE00D06111 /* RNNOverlayWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNOverlayWindow.h; sourceTree = "<group>"; };
550
 		50887CA820F26BFE00D06111 /* RNNOverlayWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNOverlayWindow.h; sourceTree = "<group>"; };
551
 		508EBDBA2278742700BEC144 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
551
 		508EBDBA2278742700BEC144 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
552
 		509B247F217873FF00C83C23 /* UINavigationController+RNNOptionsTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UINavigationController+RNNOptionsTest.m"; sourceTree = "<group>"; };
552
 		509B247F217873FF00C83C23 /* UINavigationController+RNNOptionsTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UINavigationController+RNNOptionsTest.m"; sourceTree = "<group>"; };
553
-		509B258E2178BE7A00C83C23 /* RNNNavigationControllerPresenterTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNNavigationControllerPresenterTest.m; sourceTree = "<group>"; };
553
+		509B258E2178BE7A00C83C23 /* RNNStackPresenterTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNStackPresenterTest.m; sourceTree = "<group>"; };
554
 		50A00C35200F84D6000F01A6 /* RNNOverlayOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNOverlayOptions.h; sourceTree = "<group>"; };
554
 		50A00C35200F84D6000F01A6 /* RNNOverlayOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNOverlayOptions.h; sourceTree = "<group>"; };
555
 		50A00C36200F84D6000F01A6 /* RNNOverlayOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNOverlayOptions.m; sourceTree = "<group>"; };
555
 		50A00C36200F84D6000F01A6 /* RNNOverlayOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNOverlayOptions.m; sourceTree = "<group>"; };
556
 		50AB0B1A2255F8640039DAED /* UIViewController+LayoutProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIViewController+LayoutProtocol.h"; sourceTree = "<group>"; };
556
 		50AB0B1A2255F8640039DAED /* UIViewController+LayoutProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIViewController+LayoutProtocol.h"; sourceTree = "<group>"; };
580
 		50EB4ED62068EBE000D6ED34 /* RNNBackgroundOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBackgroundOptions.m; sourceTree = "<group>"; };
580
 		50EB4ED62068EBE000D6ED34 /* RNNBackgroundOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBackgroundOptions.m; sourceTree = "<group>"; };
581
 		50EB933F1FE14A3E00BD8EEE /* RNNBottomTabOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBottomTabOptions.h; sourceTree = "<group>"; };
581
 		50EB933F1FE14A3E00BD8EEE /* RNNBottomTabOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBottomTabOptions.h; sourceTree = "<group>"; };
582
 		50EB93401FE14A3E00BD8EEE /* RNNBottomTabOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBottomTabOptions.m; sourceTree = "<group>"; };
582
 		50EB93401FE14A3E00BD8EEE /* RNNBottomTabOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBottomTabOptions.m; sourceTree = "<group>"; };
583
-		50F5DFBF1F407A8C001A00BC /* RNNTabBarController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNTabBarController.h; sourceTree = "<group>"; };
584
-		50F5DFC01F407A8C001A00BC /* RNNTabBarController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNTabBarController.m; sourceTree = "<group>"; };
585
-		50F5DFC31F407AA0001A00BC /* RNNNavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNNavigationController.h; sourceTree = "<group>"; };
586
-		50F5DFC41F407AA0001A00BC /* RNNNavigationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNNavigationController.m; sourceTree = "<group>"; };
583
+		50F5DFBF1F407A8C001A00BC /* RNNBottomTabsController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNBottomTabsController.h; sourceTree = "<group>"; };
584
+		50F5DFC01F407A8C001A00BC /* RNNBottomTabsController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNBottomTabsController.m; sourceTree = "<group>"; };
585
+		50F5DFC31F407AA0001A00BC /* RNNStackController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNStackController.h; sourceTree = "<group>"; };
586
+		50F5DFC41F407AA0001A00BC /* RNNStackController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNStackController.m; sourceTree = "<group>"; };
587
 		651E1F8821FD611600DFEA19 /* UISplitViewController+RNNOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UISplitViewController+RNNOptions.h"; sourceTree = "<group>"; };
587
 		651E1F8821FD611600DFEA19 /* UISplitViewController+RNNOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UISplitViewController+RNNOptions.h"; sourceTree = "<group>"; };
588
 		651E1F8921FD624600DFEA19 /* UISplitViewController+RNNOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UISplitViewController+RNNOptions.m"; sourceTree = "<group>"; };
588
 		651E1F8921FD624600DFEA19 /* UISplitViewController+RNNOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UISplitViewController+RNNOptions.m"; sourceTree = "<group>"; };
589
 		651E1F8B21FD63F400DFEA19 /* RNNSplitViewControllerPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNSplitViewControllerPresenter.h; sourceTree = "<group>"; };
589
 		651E1F8B21FD63F400DFEA19 /* RNNSplitViewControllerPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNSplitViewControllerPresenter.h; sourceTree = "<group>"; };
623
 		7BBFE5431E25330E002A6182 /* RNNBridgeModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNBridgeModule.m; sourceTree = "<group>"; };
623
 		7BBFE5431E25330E002A6182 /* RNNBridgeModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNBridgeModule.m; sourceTree = "<group>"; };
624
 		7BC9346C1E26886E00EFA125 /* RNNControllerFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNControllerFactory.h; sourceTree = "<group>"; };
624
 		7BC9346C1E26886E00EFA125 /* RNNControllerFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNControllerFactory.h; sourceTree = "<group>"; };
625
 		7BC9346D1E26886E00EFA125 /* RNNControllerFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNControllerFactory.m; sourceTree = "<group>"; };
625
 		7BC9346D1E26886E00EFA125 /* RNNControllerFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNControllerFactory.m; sourceTree = "<group>"; };
626
-		7BEF0D161E437684003E96B0 /* RNNRootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNRootViewController.h; sourceTree = "<group>"; };
627
-		7BEF0D171E437684003E96B0 /* RNNRootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNRootViewController.m; sourceTree = "<group>"; };
626
+		7BEF0D161E437684003E96B0 /* RNNComponentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNComponentViewController.h; sourceTree = "<group>"; };
627
+		7BEF0D171E437684003E96B0 /* RNNComponentViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNComponentViewController.m; sourceTree = "<group>"; };
628
 		7BEF0D1A1E43771B003E96B0 /* RNNLayoutNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNLayoutNode.h; sourceTree = "<group>"; };
628
 		7BEF0D1A1E43771B003E96B0 /* RNNLayoutNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNLayoutNode.h; sourceTree = "<group>"; };
629
 		7BEF0D1B1E43771B003E96B0 /* RNNLayoutNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNLayoutNode.m; sourceTree = "<group>"; };
629
 		7BEF0D1B1E43771B003E96B0 /* RNNLayoutNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNLayoutNode.m; sourceTree = "<group>"; };
630
 		A7626BFC1FC2FB2C00492FB8 /* RNNTopBarOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNTopBarOptions.m; sourceTree = "<group>"; };
630
 		A7626BFC1FC2FB2C00492FB8 /* RNNTopBarOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNTopBarOptions.m; sourceTree = "<group>"; };
662
 		E8A430101F9CB87B00B61A20 /* RNNAnimatedView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNAnimatedView.m; sourceTree = "<group>"; };
662
 		E8A430101F9CB87B00B61A20 /* RNNAnimatedView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNAnimatedView.m; sourceTree = "<group>"; };
663
 		E8A5CD501F464F0400E89D0D /* RNNAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNAnimator.h; sourceTree = "<group>"; };
663
 		E8A5CD501F464F0400E89D0D /* RNNAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNAnimator.h; sourceTree = "<group>"; };
664
 		E8A5CD511F464F0400E89D0D /* RNNAnimator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNAnimator.m; sourceTree = "<group>"; };
664
 		E8A5CD511F464F0400E89D0D /* RNNAnimator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNAnimator.m; sourceTree = "<group>"; };
665
-		E8A5CD581F48CCC300E89D0D /* RNNNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNNavigationController.h; sourceTree = "<group>"; };
665
+		E8A5CD581F48CCC300E89D0D /* RNNStackController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNStackController.h; sourceTree = "<group>"; };
666
 		E8A5CD601F49114F00E89D0D /* RNNElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNElement.h; sourceTree = "<group>"; };
666
 		E8A5CD601F49114F00E89D0D /* RNNElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNElement.h; sourceTree = "<group>"; };
667
 		E8A5CD611F49114F00E89D0D /* RNNElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNElement.m; sourceTree = "<group>"; };
667
 		E8A5CD611F49114F00E89D0D /* RNNElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNElement.m; sourceTree = "<group>"; };
668
 		E8AEDB3A1F55A1C2000F5A6A /* RNNElementView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNElementView.h; sourceTree = "<group>"; };
668
 		E8AEDB3A1F55A1C2000F5A6A /* RNNElementView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNElementView.h; sourceTree = "<group>"; };
777
 		5012242C2173E0A4000F5F98 /* Parent ViewControllers */ = {
777
 		5012242C2173E0A4000F5F98 /* Parent ViewControllers */ = {
778
 			isa = PBXGroup;
778
 			isa = PBXGroup;
779
 			children = (
779
 			children = (
780
-				50F5DFBF1F407A8C001A00BC /* RNNTabBarController.h */,
781
-				50F5DFC01F407A8C001A00BC /* RNNTabBarController.m */,
782
-				50F5DFC31F407AA0001A00BC /* RNNNavigationController.h */,
783
-				50F5DFC41F407AA0001A00BC /* RNNNavigationController.m */,
780
+				50F5DFBF1F407A8C001A00BC /* RNNBottomTabsController.h */,
781
+				50F5DFC01F407A8C001A00BC /* RNNBottomTabsController.m */,
782
+				50F5DFC31F407AA0001A00BC /* RNNStackController.h */,
783
+				50F5DFC41F407AA0001A00BC /* RNNStackController.m */,
784
 				263905D41E4C94970023D7D3 /* RNNSideMenuController.h */,
784
 				263905D41E4C94970023D7D3 /* RNNSideMenuController.h */,
785
 				263905D51E4C94970023D7D3 /* RNNSideMenuController.m */,
785
 				263905D51E4C94970023D7D3 /* RNNSideMenuController.m */,
786
 				263905E41E4CAC950023D7D3 /* RNNSideMenuChildVC.h */,
786
 				263905E41E4CAC950023D7D3 /* RNNSideMenuChildVC.h */,
947
 			children = (
947
 			children = (
948
 				5012240C21735999000F5F98 /* RNNBasePresenter.h */,
948
 				5012240C21735999000F5F98 /* RNNBasePresenter.h */,
949
 				5012240D21735999000F5F98 /* RNNBasePresenter.m */,
949
 				5012240D21735999000F5F98 /* RNNBasePresenter.m */,
950
-				505EDD3A214FA8000071C7DE /* RNNViewControllerPresenter.h */,
951
-				505EDD3B214FA8000071C7DE /* RNNViewControllerPresenter.m */,
952
-				501223D52173590F000F5F98 /* RNNNavigationControllerPresenter.h */,
953
-				501223D62173590F000F5F98 /* RNNNavigationControllerPresenter.m */,
954
-				501224042173592D000F5F98 /* RNNTabBarPresenter.h */,
955
-				501224052173592D000F5F98 /* RNNTabBarPresenter.m */,
950
+				505EDD3A214FA8000071C7DE /* RNNComponentPresenter.h */,
951
+				505EDD3B214FA8000071C7DE /* RNNComponentPresenter.m */,
952
+				501223D52173590F000F5F98 /* RNNStackPresenter.h */,
953
+				501223D62173590F000F5F98 /* RNNStackPresenter.m */,
954
+				501224042173592D000F5F98 /* RNNBottomTabsPresenter.h */,
955
+				501224052173592D000F5F98 /* RNNBottomTabsPresenter.m */,
956
 				5012240821735959000F5F98 /* RNNSideMenuPresenter.h */,
956
 				5012240821735959000F5F98 /* RNNSideMenuPresenter.h */,
957
 				5012240921735959000F5F98 /* RNNSideMenuPresenter.m */,
957
 				5012240921735959000F5F98 /* RNNSideMenuPresenter.m */,
958
 				651E1F8B21FD63F400DFEA19 /* RNNSplitViewControllerPresenter.h */,
958
 				651E1F8B21FD63F400DFEA19 /* RNNSplitViewControllerPresenter.h */,
1006
 				501E0215213E7EA3003365C5 /* RNNReactView.h */,
1006
 				501E0215213E7EA3003365C5 /* RNNReactView.h */,
1007
 				501E0216213E7EA3003365C5 /* RNNReactView.m */,
1007
 				501E0216213E7EA3003365C5 /* RNNReactView.m */,
1008
 				50570BE92063E09B006A1B5C /* RNNTitleViewHelper.m */,
1008
 				50570BE92063E09B006A1B5C /* RNNTitleViewHelper.m */,
1009
-				26916C941E4B9CCC00D13680 /* RNNRootViewCreator.h */,
1009
+				26916C941E4B9CCC00D13680 /* RNNComponentViewCreator.h */,
1010
 				26916C961E4B9E7700D13680 /* RNNReactRootViewCreator.h */,
1010
 				26916C961E4B9E7700D13680 /* RNNReactRootViewCreator.h */,
1011
 				26916C971E4B9E7700D13680 /* RNNReactRootViewCreator.m */,
1011
 				26916C971E4B9E7700D13680 /* RNNReactRootViewCreator.m */,
1012
 				7BA500761E254908001B9E1B /* RNNSplashScreen.h */,
1012
 				7BA500761E254908001B9E1B /* RNNSplashScreen.h */,
1013
 				7BA500771E254908001B9E1B /* RNNSplashScreen.m */,
1013
 				7BA500771E254908001B9E1B /* RNNSplashScreen.m */,
1014
 				7BEF0D1A1E43771B003E96B0 /* RNNLayoutNode.h */,
1014
 				7BEF0D1A1E43771B003E96B0 /* RNNLayoutNode.h */,
1015
 				7BEF0D1B1E43771B003E96B0 /* RNNLayoutNode.m */,
1015
 				7BEF0D1B1E43771B003E96B0 /* RNNLayoutNode.m */,
1016
-				7BEF0D161E437684003E96B0 /* RNNRootViewController.h */,
1017
-				7BEF0D171E437684003E96B0 /* RNNRootViewController.m */,
1016
+				7BEF0D161E437684003E96B0 /* RNNComponentViewController.h */,
1017
+				7BEF0D171E437684003E96B0 /* RNNComponentViewController.m */,
1018
 				7BC9346C1E26886E00EFA125 /* RNNControllerFactory.h */,
1018
 				7BC9346C1E26886E00EFA125 /* RNNControllerFactory.h */,
1019
 				7BC9346D1E26886E00EFA125 /* RNNControllerFactory.m */,
1019
 				7BC9346D1E26886E00EFA125 /* RNNControllerFactory.m */,
1020
 				21B85E5E1F44482A00B314B5 /* RNNNavigationButtons.h */,
1020
 				21B85E5E1F44482A00B314B5 /* RNNNavigationButtons.h */,
1042
 				505EDD31214E4BE80071C7DE /* RNNNavigationControllerTest.m */,
1042
 				505EDD31214E4BE80071C7DE /* RNNNavigationControllerTest.m */,
1043
 				506F630C216A599300AD0D0A /* RNNTabBarControllerTest.m */,
1043
 				506F630C216A599300AD0D0A /* RNNTabBarControllerTest.m */,
1044
 				506F630E216A5AD700AD0D0A /* RNNViewControllerPresenterTest.m */,
1044
 				506F630E216A5AD700AD0D0A /* RNNViewControllerPresenterTest.m */,
1045
-				509B258E2178BE7A00C83C23 /* RNNNavigationControllerPresenterTest.m */,
1045
+				509B258E2178BE7A00C83C23 /* RNNStackPresenterTest.m */,
1046
 				502F0E172179C39900367CC3 /* RNNTabBarPresenterTest.m */,
1046
 				502F0E172179C39900367CC3 /* RNNTabBarPresenterTest.m */,
1047
 				50CE8502217C6C9B00084EBF /* RNNSideMenuPresenterTest.m */,
1047
 				50CE8502217C6C9B00084EBF /* RNNSideMenuPresenterTest.m */,
1048
 				5085DD2C21DCF75A0032E64B /* RNNSideMenuControllerTest.m */,
1048
 				5085DD2C21DCF75A0032E64B /* RNNSideMenuControllerTest.m */,
1171
 		E8367B791F77BA1F00675C05 /* Recovered References */ = {
1171
 		E8367B791F77BA1F00675C05 /* Recovered References */ = {
1172
 			isa = PBXGroup;
1172
 			isa = PBXGroup;
1173
 			children = (
1173
 			children = (
1174
-				E8A5CD581F48CCC300E89D0D /* RNNNavigationController.h */,
1174
+				E8A5CD581F48CCC300E89D0D /* RNNStackController.h */,
1175
 				30987F787A14D232AB091E7E /* UIView+Utils.m */,
1175
 				30987F787A14D232AB091E7E /* UIView+Utils.m */,
1176
 				30987D981545DCBBCCAB34F0 /* UIViewController+Utils.m */,
1176
 				30987D981545DCBBCCAB34F0 /* UIViewController+Utils.m */,
1177
 				30987F749DCD552D95979721 /* UITabBarController+RNNUtils.m */,
1177
 				30987F749DCD552D95979721 /* UITabBarController+RNNUtils.m */,
1251
 				5012241621736667000F5F98 /* Color.h in Headers */,
1251
 				5012241621736667000F5F98 /* Color.h in Headers */,
1252
 				7365071121E4B16F004E020F /* RCTConvert+UIBarButtonSystemItem.h in Headers */,
1252
 				7365071121E4B16F004E020F /* RCTConvert+UIBarButtonSystemItem.h in Headers */,
1253
 				5064495D20DC62B90026709C /* RNNSideMenuSideOptions.h in Headers */,
1253
 				5064495D20DC62B90026709C /* RNNSideMenuSideOptions.h in Headers */,
1254
-				50F5DFC11F407A8C001A00BC /* RNNTabBarController.h in Headers */,
1254
+				50F5DFC11F407A8C001A00BC /* RNNBottomTabsController.h in Headers */,
1255
 				50395587217480C900B0A663 /* IntNumber.h in Headers */,
1255
 				50395587217480C900B0A663 /* IntNumber.h in Headers */,
1256
 				5012242A217372B3000F5F98 /* ImageParser.h in Headers */,
1256
 				5012242A217372B3000F5F98 /* ImageParser.h in Headers */,
1257
 				50CB3B691FDE911400AA153B /* RNNSideMenuOptions.h in Headers */,
1257
 				50CB3B691FDE911400AA153B /* RNNSideMenuOptions.h in Headers */,
1270
 				263905B51E4C6F440023D7D3 /* MMExampleDrawerVisualStateManager.h in Headers */,
1270
 				263905B51E4C6F440023D7D3 /* MMExampleDrawerVisualStateManager.h in Headers */,
1271
 				50451D052042DAEB00695F00 /* RNNPushAnimation.h in Headers */,
1271
 				50451D052042DAEB00695F00 /* RNNPushAnimation.h in Headers */,
1272
 				507F43C51FF4F17C00D9425B /* RNNTopTabsViewController.h in Headers */,
1272
 				507F43C51FF4F17C00D9425B /* RNNTopTabsViewController.h in Headers */,
1273
-				501223D72173590F000F5F98 /* RNNNavigationControllerPresenter.h in Headers */,
1273
+				501223D72173590F000F5F98 /* RNNStackPresenter.h in Headers */,
1274
 				50495946216F5FB5006D2B81 /* TextParser.h in Headers */,
1274
 				50495946216F5FB5006D2B81 /* TextParser.h in Headers */,
1275
-				505EDD3C214FA8000071C7DE /* RNNViewControllerPresenter.h in Headers */,
1275
+				505EDD3C214FA8000071C7DE /* RNNComponentPresenter.h in Headers */,
1276
 				502CB46E20CD1DDA0019B2FE /* RNNBackButtonOptions.h in Headers */,
1276
 				502CB46E20CD1DDA0019B2FE /* RNNBackButtonOptions.h in Headers */,
1277
 				50495939216E5750006D2B81 /* Bool.h in Headers */,
1277
 				50495939216E5750006D2B81 /* Bool.h in Headers */,
1278
 				7B1126A31E2D2B6C00F9B03B /* RNNSplashScreen.h in Headers */,
1278
 				7B1126A31E2D2B6C00F9B03B /* RNNSplashScreen.h in Headers */,
1285
 				5012241E217366D4000F5F98 /* ColorParser.h in Headers */,
1285
 				5012241E217366D4000F5F98 /* ColorParser.h in Headers */,
1286
 				E8367B801F7A8A4700675C05 /* VICMAImageView.h in Headers */,
1286
 				E8367B801F7A8A4700675C05 /* VICMAImageView.h in Headers */,
1287
 				263905E61E4CAC950023D7D3 /* RNNSideMenuChildVC.h in Headers */,
1287
 				263905E61E4CAC950023D7D3 /* RNNSideMenuChildVC.h in Headers */,
1288
-				50F5DFC51F407AA0001A00BC /* RNNNavigationController.h in Headers */,
1288
+				50F5DFC51F407AA0001A00BC /* RNNStackController.h in Headers */,
1289
 				5047E4F42267568800908DD3 /* RNNExternalComponentStore.h in Headers */,
1289
 				5047E4F42267568800908DD3 /* RNNExternalComponentStore.h in Headers */,
1290
 				21B85E5F1F44482A00B314B5 /* RNNNavigationButtons.h in Headers */,
1290
 				21B85E5F1F44482A00B314B5 /* RNNNavigationButtons.h in Headers */,
1291
-				7BEF0D181E437684003E96B0 /* RNNRootViewController.h in Headers */,
1291
+				7BEF0D181E437684003E96B0 /* RNNComponentViewController.h in Headers */,
1292
 				7B1126A61E2D2B6C00F9B03B /* RNNBridgeModule.h in Headers */,
1292
 				7B1126A61E2D2B6C00F9B03B /* RNNBridgeModule.h in Headers */,
1293
 				E8DA24401F97459B00CD552B /* RNNElementFinder.h in Headers */,
1293
 				E8DA24401F97459B00CD552B /* RNNElementFinder.h in Headers */,
1294
 				50AB0B1C2255F8640039DAED /* UIViewController+LayoutProtocol.h in Headers */,
1294
 				50AB0B1C2255F8640039DAED /* UIViewController+LayoutProtocol.h in Headers */,
1350
 				5038A3B1216DF41B009280BC /* UIViewController+RNNOptions.h in Headers */,
1350
 				5038A3B1216DF41B009280BC /* UIViewController+RNNOptions.h in Headers */,
1351
 				505EDD4A214FDA800071C7DE /* RCTConvert+Modal.h in Headers */,
1351
 				505EDD4A214FDA800071C7DE /* RCTConvert+Modal.h in Headers */,
1352
 				5049595A216F6B46006D2B81 /* NullDictionary.h in Headers */,
1352
 				5049595A216F6B46006D2B81 /* NullDictionary.h in Headers */,
1353
-				501224062173592D000F5F98 /* RNNTabBarPresenter.h in Headers */,
1353
+				501224062173592D000F5F98 /* RNNBottomTabsPresenter.h in Headers */,
1354
 				50706E6D20CE7CA5003345C3 /* UIImage+tint.h in Headers */,
1354
 				50706E6D20CE7CA5003345C3 /* UIImage+tint.h in Headers */,
1355
 				309874B40D202C9718F15CBD /* UIView+Utils.h in Headers */,
1355
 				309874B40D202C9718F15CBD /* UIView+Utils.h in Headers */,
1356
 				309877B0B5AAA7788F56F3D9 /* UIViewController+Utils.h in Headers */,
1356
 				309877B0B5AAA7788F56F3D9 /* UIViewController+Utils.h in Headers */,
1475
 				506F630D216A599300AD0D0A /* RNNTabBarControllerTest.m in Sources */,
1475
 				506F630D216A599300AD0D0A /* RNNTabBarControllerTest.m in Sources */,
1476
 				7B49FECB1E95098500DEB3EA /* RNNControllerFactoryTest.m in Sources */,
1476
 				7B49FECB1E95098500DEB3EA /* RNNControllerFactoryTest.m in Sources */,
1477
 				50206A6D21AFE75400B7BB1A /* RNNSideMenuParserTest.m in Sources */,
1477
 				50206A6D21AFE75400B7BB1A /* RNNSideMenuParserTest.m in Sources */,
1478
-				509B258F2178BE7A00C83C23 /* RNNNavigationControllerPresenterTest.m in Sources */,
1478
+				509B258F2178BE7A00C83C23 /* RNNStackPresenterTest.m in Sources */,
1479
 				7B49FECD1E95098500DEB3EA /* RNNModalManagerTest.m in Sources */,
1479
 				7B49FECD1E95098500DEB3EA /* RNNModalManagerTest.m in Sources */,
1480
 				5085DD2D21DCF75A0032E64B /* RNNSideMenuControllerTest.m in Sources */,
1480
 				5085DD2D21DCF75A0032E64B /* RNNSideMenuControllerTest.m in Sources */,
1481
 				E83BAD791F27416B00A9F3DD /* RNNRootViewControllerTest.m in Sources */,
1481
 				E83BAD791F27416B00A9F3DD /* RNNRootViewControllerTest.m in Sources */,
1506
 				50451D0E2042F70900695F00 /* RNNTransition.m in Sources */,
1506
 				50451D0E2042F70900695F00 /* RNNTransition.m in Sources */,
1507
 				5048862E20BE976D000908DE /* RNNLayoutOptions.m in Sources */,
1507
 				5048862E20BE976D000908DE /* RNNLayoutOptions.m in Sources */,
1508
 				501CD320214A5B6900A6E225 /* RNNLayoutInfo.m in Sources */,
1508
 				501CD320214A5B6900A6E225 /* RNNLayoutInfo.m in Sources */,
1509
-				7BEF0D191E437684003E96B0 /* RNNRootViewController.m in Sources */,
1509
+				7BEF0D191E437684003E96B0 /* RNNComponentViewController.m in Sources */,
1510
 				50415CBB20553B8E00BB682E /* RNNScreenTransition.m in Sources */,
1510
 				50415CBB20553B8E00BB682E /* RNNScreenTransition.m in Sources */,
1511
 				E8A5CD531F464F0400E89D0D /* RNNAnimator.m in Sources */,
1511
 				E8A5CD531F464F0400E89D0D /* RNNAnimator.m in Sources */,
1512
 				50CB3B6A1FDE911400AA153B /* RNNSideMenuOptions.m in Sources */,
1512
 				50CB3B6A1FDE911400AA153B /* RNNSideMenuOptions.m in Sources */,
1535
 				5038A3BA216DFCFD009280BC /* UITabBarController+RNNOptions.m in Sources */,
1535
 				5038A3BA216DFCFD009280BC /* UITabBarController+RNNOptions.m in Sources */,
1536
 				263905B21E4C6F440023D7D3 /* MMDrawerController.m in Sources */,
1536
 				263905B21E4C6F440023D7D3 /* MMDrawerController.m in Sources */,
1537
 				50644A2120E11A720026709C /* Constants.m in Sources */,
1537
 				50644A2120E11A720026709C /* Constants.m in Sources */,
1538
-				501223D82173590F000F5F98 /* RNNNavigationControllerPresenter.m in Sources */,
1538
+				501223D82173590F000F5F98 /* RNNStackPresenter.m in Sources */,
1539
 				E8AEDB3D1F55A1C2000F5A6A /* RNNElementView.m in Sources */,
1539
 				E8AEDB3D1F55A1C2000F5A6A /* RNNElementView.m in Sources */,
1540
 				E83BAD6B1F27363A00A9F3DD /* RNNNavigationOptions.m in Sources */,
1540
 				E83BAD6B1F27363A00A9F3DD /* RNNNavigationOptions.m in Sources */,
1541
 				5049594F216F6277006D2B81 /* NumberParser.m in Sources */,
1541
 				5049594F216F6277006D2B81 /* NumberParser.m in Sources */,
1559
 				504AFE651FFE53070076E904 /* RNNOptions.m in Sources */,
1559
 				504AFE651FFE53070076E904 /* RNNOptions.m in Sources */,
1560
 				5053CE802175FB1900D0386B /* RNNDefaultOptionsHelper.m in Sources */,
1560
 				5053CE802175FB1900D0386B /* RNNDefaultOptionsHelper.m in Sources */,
1561
 				50495947216F5FB5006D2B81 /* TextParser.m in Sources */,
1561
 				50495947216F5FB5006D2B81 /* TextParser.m in Sources */,
1562
-				50F5DFC21F407A8C001A00BC /* RNNTabBarController.m in Sources */,
1562
+				50F5DFC21F407A8C001A00BC /* RNNBottomTabsController.m in Sources */,
1563
 				50887CA920F26BFE00D06111 /* RNNOverlayWindow.m in Sources */,
1563
 				50887CA920F26BFE00D06111 /* RNNOverlayWindow.m in Sources */,
1564
 				5038A3CF216E35E0009280BC /* Dictionary.m in Sources */,
1564
 				5038A3CF216E35E0009280BC /* Dictionary.m in Sources */,
1565
 				C2A57A1D21E815F80066711C /* InteractivePopGestureDelegate.m in Sources */,
1565
 				C2A57A1D21E815F80066711C /* InteractivePopGestureDelegate.m in Sources */,
1575
 				E5F6C3AD22DB4D0F0093C2CE /* UITabBarController+RNNUtils.m in Sources */,
1575
 				E5F6C3AD22DB4D0F0093C2CE /* UITabBarController+RNNUtils.m in Sources */,
1576
 				214545251F4DC125006E8DA1 /* RNNUIBarButtonItem.m in Sources */,
1576
 				214545251F4DC125006E8DA1 /* RNNUIBarButtonItem.m in Sources */,
1577
 				263905B81E4C6F440023D7D3 /* UIViewController+MMDrawerController.m in Sources */,
1577
 				263905B81E4C6F440023D7D3 /* UIViewController+MMDrawerController.m in Sources */,
1578
-				505EDD3D214FA8000071C7DE /* RNNViewControllerPresenter.m in Sources */,
1578
+				505EDD3D214FA8000071C7DE /* RNNComponentPresenter.m in Sources */,
1579
 				E33AC20820B5C4F90090DB8A /* RNNSplitViewOptions.m in Sources */,
1579
 				E33AC20820B5C4F90090DB8A /* RNNSplitViewOptions.m in Sources */,
1580
 				E33AC20020B5BA0B0090DB8A /* RNNSplitViewController.m in Sources */,
1580
 				E33AC20020B5BA0B0090DB8A /* RNNSplitViewController.m in Sources */,
1581
 				5038A3C2216E1E66009280BC /* RNNFontAttributesCreator.m in Sources */,
1581
 				5038A3C2216E1E66009280BC /* RNNFontAttributesCreator.m in Sources */,
1587
 				5039558C2174829400B0A663 /* IntNumberParser.m in Sources */,
1587
 				5039558C2174829400B0A663 /* IntNumberParser.m in Sources */,
1588
 				507F43C61FF4F17C00D9425B /* RNNTopTabsViewController.m in Sources */,
1588
 				507F43C61FF4F17C00D9425B /* RNNTopTabsViewController.m in Sources */,
1589
 				50706E6E20CE7CA5003345C3 /* UIImage+tint.m in Sources */,
1589
 				50706E6E20CE7CA5003345C3 /* UIImage+tint.m in Sources */,
1590
-				501224072173592D000F5F98 /* RNNTabBarPresenter.m in Sources */,
1590
+				501224072173592D000F5F98 /* RNNBottomTabsPresenter.m in Sources */,
1591
 				50A00C38200F84D6000F01A6 /* RNNOverlayOptions.m in Sources */,
1591
 				50A00C38200F84D6000F01A6 /* RNNOverlayOptions.m in Sources */,
1592
 				5039559C2174867000B0A663 /* DoubleParser.m in Sources */,
1592
 				5039559C2174867000B0A663 /* DoubleParser.m in Sources */,
1593
 				E5F6C3A822DB4D0F0093C2CE /* UIView+Utils.m in Sources */,
1593
 				E5F6C3A822DB4D0F0093C2CE /* UIView+Utils.m in Sources */,
1617
 				E8E518331F83B3E0000467AC /* RNNUtils.m in Sources */,
1617
 				E8E518331F83B3E0000467AC /* RNNUtils.m in Sources */,
1618
 				50451D062042DAEB00695F00 /* RNNPushAnimation.m in Sources */,
1618
 				50451D062042DAEB00695F00 /* RNNPushAnimation.m in Sources */,
1619
 				5049593A216E5750006D2B81 /* Bool.m in Sources */,
1619
 				5049593A216E5750006D2B81 /* Bool.m in Sources */,
1620
-				50F5DFC61F407AA0001A00BC /* RNNNavigationController.m in Sources */,
1620
+				50F5DFC61F407AA0001A00BC /* RNNStackController.m in Sources */,
1621
 				21B85E5D1F44480200B314B5 /* RNNNavigationButtons.m in Sources */,
1621
 				21B85E5D1F44480200B314B5 /* RNNNavigationButtons.m in Sources */,
1622
 				E8E518371F83B94A000467AC /* RNNViewLocation.m in Sources */,
1622
 				E8E518371F83B94A000467AC /* RNNViewLocation.m in Sources */,
1623
 				E3458D3E20BD9CE40023149B /* RNNPreviewOptions.m in Sources */,
1623
 				E3458D3E20BD9CE40023149B /* RNNPreviewOptions.m in Sources */,

+ 7
- 7
lib/ios/ReactNativeNavigationTests/RNNBasePresenterTest.m View File

2
 #import "RNNBasePresenter.h"
2
 #import "RNNBasePresenter.h"
3
 #import <OCMock/OCMock.h>
3
 #import <OCMock/OCMock.h>
4
 #import "UIViewController+RNNOptions.h"
4
 #import "UIViewController+RNNOptions.h"
5
-#import "RNNRootViewController.h"
5
+#import "RNNComponentViewController.h"
6
 
6
 
7
 @interface RNNBottomTabPresenterTest : XCTestCase
7
 @interface RNNBottomTabPresenterTest : XCTestCase
8
 
8
 
9
 @property(nonatomic, strong) RNNBasePresenter *uut;
9
 @property(nonatomic, strong) RNNBasePresenter *uut;
10
 @property(nonatomic, strong) RNNNavigationOptions *options;
10
 @property(nonatomic, strong) RNNNavigationOptions *options;
11
-@property(nonatomic, strong) RNNRootViewController *boundViewController;
11
+@property(nonatomic, strong) RNNComponentViewController *boundViewController;
12
 @property(nonatomic, strong) id mockBoundViewController;
12
 @property(nonatomic, strong) id mockBoundViewController;
13
 
13
 
14
 @end
14
 @end
18
 - (void)setUp {
18
 - (void)setUp {
19
     [super setUp];
19
     [super setUp];
20
     self.uut = [[RNNBasePresenter alloc] init];
20
     self.uut = [[RNNBasePresenter alloc] init];
21
-    self.boundViewController = [RNNRootViewController new];
21
+    self.boundViewController = [RNNComponentViewController new];
22
     self.mockBoundViewController = [OCMockObject partialMockForObject:self.boundViewController];
22
     self.mockBoundViewController = [OCMockObject partialMockForObject:self.boundViewController];
23
     [self.uut bindViewController:self.mockBoundViewController];
23
     [self.uut bindViewController:self.mockBoundViewController];
24
     self.options = [[RNNNavigationOptions alloc] initEmptyOptions];
24
     self.options = [[RNNNavigationOptions alloc] initEmptyOptions];
31
 }
31
 }
32
 
32
 
33
 - (void)testApplyOptions_shouldSetTabBarItemBadgeOnlyWhenParentIsUITabBarController {
33
 - (void)testApplyOptions_shouldSetTabBarItemBadgeOnlyWhenParentIsUITabBarController {
34
-    [[self.mockBoundViewController reject] rnn_setTabBarItemBadge:[OCMArg any]];
34
+    [[self.mockBoundViewController reject] setTabBarItemBadge:[OCMArg any]];
35
     [self.uut applyOptions:self.options];
35
     [self.uut applyOptions:self.options];
36
     [self.mockBoundViewController verify];
36
     [self.mockBoundViewController verify];
37
 }
37
 }
39
 - (void)testApplyOptions_shouldSetTabBarItemBadgeWithValue {
39
 - (void)testApplyOptions_shouldSetTabBarItemBadgeWithValue {
40
     OCMStub([self.mockBoundViewController parentViewController]).andReturn([UITabBarController new]);
40
     OCMStub([self.mockBoundViewController parentViewController]).andReturn([UITabBarController new]);
41
     self.options.bottomTab.badge = [[Text alloc] initWithValue:@"badge"];
41
     self.options.bottomTab.badge = [[Text alloc] initWithValue:@"badge"];
42
-    [[self.mockBoundViewController expect] rnn_setTabBarItemBadge:self.options.bottomTab.badge.get];
42
+    [[self.mockBoundViewController expect] setTabBarItemBadge:self.options.bottomTab.badge.get];
43
     [self.uut applyOptions:self.options];
43
     [self.uut applyOptions:self.options];
44
     [self.mockBoundViewController verify];
44
     [self.mockBoundViewController verify];
45
 }
45
 }
47
 - (void)testApplyOptions_setTabBarItemBadgeShouldNotCalledOnUITabBarController {
47
 - (void)testApplyOptions_setTabBarItemBadgeShouldNotCalledOnUITabBarController {
48
     [self.uut bindViewController:self.mockBoundViewController];
48
     [self.uut bindViewController:self.mockBoundViewController];
49
     self.options.bottomTab.badge = [[Text alloc] initWithValue:@"badge"];
49
     self.options.bottomTab.badge = [[Text alloc] initWithValue:@"badge"];
50
-    [[self.mockBoundViewController reject] rnn_setTabBarItemBadge:[[RNNBottomTabOptions alloc] initWithDict:@{@"badge": @"badge"}]];
50
+    [[self.mockBoundViewController reject] setTabBarItemBadge:[[RNNBottomTabOptions alloc] initWithDict:@{@"badge": @"badge"}]];
51
     [self.uut applyOptions:self.options];
51
     [self.uut applyOptions:self.options];
52
     [self.mockBoundViewController verify];
52
     [self.mockBoundViewController verify];
53
 }
53
 }
55
 - (void)testApplyOptions_setTabBarItemBadgeShouldWhenNoValue {
55
 - (void)testApplyOptions_setTabBarItemBadgeShouldWhenNoValue {
56
     [self.uut bindViewController:self.mockBoundViewController];
56
     [self.uut bindViewController:self.mockBoundViewController];
57
     self.options.bottomTab.badge = nil;
57
     self.options.bottomTab.badge = nil;
58
-    [[self.mockBoundViewController reject] rnn_setTabBarItemBadge:[OCMArg any]];
58
+    [[self.mockBoundViewController reject] setTabBarItemBadge:[OCMArg any]];
59
     [self.uut applyOptions:self.options];
59
     [self.uut applyOptions:self.options];
60
     [self.mockBoundViewController verify];
60
     [self.mockBoundViewController verify];
61
 }
61
 }

+ 16
- 16
lib/ios/ReactNativeNavigationTests/RNNCommandsHandlerTest.m View File

3
 #import "RNNCommandsHandler.h"
3
 #import "RNNCommandsHandler.h"
4
 #import "RNNNavigationOptions.h"
4
 #import "RNNNavigationOptions.h"
5
 #import "RNNTestRootViewCreator.h"
5
 #import "RNNTestRootViewCreator.h"
6
-#import "RNNRootViewController.h"
7
-#import "RNNNavigationController.h"
6
+#import "RNNComponentViewController.h"
7
+#import "RNNStackController.h"
8
 #import "RNNErrorHandler.h"
8
 #import "RNNErrorHandler.h"
9
 #import <OCMock/OCMock.h>
9
 #import <OCMock/OCMock.h>
10
 #import "RNNLayoutManager.h"
10
 #import "RNNLayoutManager.h"
23
 
23
 
24
 @end
24
 @end
25
 
25
 
26
-@interface MockUINavigationController : RNNNavigationController
26
+@interface MockUINavigationController : RNNStackController
27
 @property (nonatomic, strong) NSArray* willReturnVCs;
27
 @property (nonatomic, strong) NSArray* willReturnVCs;
28
 @end
28
 @end
29
 
29
 
43
 
43
 
44
 @property (nonatomic, strong) RNNCommandsHandler* uut;
44
 @property (nonatomic, strong) RNNCommandsHandler* uut;
45
 @property (nonatomic, strong) id modalManager;
45
 @property (nonatomic, strong) id modalManager;
46
-@property (nonatomic, strong) RNNRootViewController* vc1;
47
-@property (nonatomic, strong) RNNRootViewController* vc2;
48
-@property (nonatomic, strong) RNNRootViewController* vc3;
46
+@property (nonatomic, strong) RNNComponentViewController* vc1;
47
+@property (nonatomic, strong) RNNComponentViewController* vc2;
48
+@property (nonatomic, strong) RNNComponentViewController* vc3;
49
 @property (nonatomic, strong) MockUINavigationController* nvc;
49
 @property (nonatomic, strong) MockUINavigationController* nvc;
50
 @property (nonatomic, strong) id mainWindow;
50
 @property (nonatomic, strong) id mainWindow;
51
 @property (nonatomic, strong) id sharedApplication;
51
 @property (nonatomic, strong) id sharedApplication;
65
 	self.modalManager = [OCMockObject partialMockForObject:[RNNModalManager new]];
65
 	self.modalManager = [OCMockObject partialMockForObject:[RNNModalManager new]];
66
 	self.controllerFactory = [OCMockObject partialMockForObject:[[RNNControllerFactory alloc] initWithRootViewCreator:nil eventEmitter:self.eventEmmiter store:nil componentRegistry:nil andBridge:nil]];
66
 	self.controllerFactory = [OCMockObject partialMockForObject:[[RNNControllerFactory alloc] initWithRootViewCreator:nil eventEmitter:self.eventEmmiter store:nil componentRegistry:nil andBridge:nil]];
67
 	self.uut = [[RNNCommandsHandler alloc] initWithControllerFactory:self.controllerFactory eventEmitter:self.eventEmmiter stackManager:[RNNNavigationStackManager new] modalManager:self.modalManager overlayManager:self.overlayManager mainWindow:_mainWindow];
67
 	self.uut = [[RNNCommandsHandler alloc] initWithControllerFactory:self.controllerFactory eventEmitter:self.eventEmmiter stackManager:[RNNNavigationStackManager new] modalManager:self.modalManager overlayManager:self.overlayManager mainWindow:_mainWindow];
68
-	self.vc1 = [RNNRootViewController new];
69
-	self.vc2 = [RNNRootViewController new];
70
-	self.vc3 = [RNNRootViewController new];
68
+	self.vc1 = [RNNComponentViewController new];
69
+	self.vc2 = [RNNComponentViewController new];
70
+	self.vc3 = [RNNComponentViewController new];
71
 	_nvc = [[MockUINavigationController alloc] init];
71
 	_nvc = [[MockUINavigationController alloc] init];
72
 	[_nvc setViewControllers:@[self.vc1, self.vc2, self.vc3]];
72
 	[_nvc setViewControllers:@[self.vc1, self.vc2, self.vc3]];
73
 	OCMStub([self.sharedApplication keyWindow]).andReturn(self.mainWindow);
73
 	OCMStub([self.sharedApplication keyWindow]).andReturn(self.mainWindow);
121
 	RNNLayoutInfo* layoutInfo = [RNNLayoutInfo new];
121
 	RNNLayoutInfo* layoutInfo = [RNNLayoutInfo new];
122
 	RNNTestRootViewCreator* creator = [[RNNTestRootViewCreator alloc] init];
122
 	RNNTestRootViewCreator* creator = [[RNNTestRootViewCreator alloc] init];
123
 	
123
 	
124
-	RNNViewControllerPresenter* presenter = [[RNNViewControllerPresenter alloc] init];
125
-	RNNRootViewController* vc = [[RNNRootViewController alloc] initWithLayoutInfo:layoutInfo rootViewCreator:creator eventEmitter:nil presenter:presenter options:initialOptions defaultOptions:nil];
124
+	RNNComponentPresenter* presenter = [[RNNComponentPresenter alloc] init];
125
+	RNNComponentViewController* vc = [[RNNComponentViewController alloc] initWithLayoutInfo:layoutInfo rootViewCreator:creator eventEmitter:nil presenter:presenter options:initialOptions defaultOptions:nil];
126
 	
126
 	
127
-	RNNNavigationController* nav = [[RNNNavigationController alloc] initWithLayoutInfo:nil creator:creator options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:[[RNNNavigationControllerPresenter alloc] init] eventEmitter:nil childViewControllers:@[vc]];
127
+	RNNStackController* nav = [[RNNStackController alloc] initWithLayoutInfo:nil creator:creator options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:[[RNNStackPresenter alloc] init] eventEmitter:nil childViewControllers:@[vc]];
128
 	
128
 	
129
 	[vc viewWillAppear:false];
129
 	[vc viewWillAppear:false];
130
 	XCTAssertTrue([vc.navigationItem.title isEqual:@"the title"]);
130
 	XCTAssertTrue([vc.navigationItem.title isEqual:@"the title"]);
144
 	RNNNavigationOptions* initialOptions = [[RNNNavigationOptions alloc] initWithDict:@{}];
144
 	RNNNavigationOptions* initialOptions = [[RNNNavigationOptions alloc] initWithDict:@{}];
145
 	initialOptions.topBar.title.text = [[Text alloc] initWithValue:@"the title"];
145
 	initialOptions.topBar.title.text = [[Text alloc] initWithValue:@"the title"];
146
 	
146
 	
147
-	RNNViewControllerPresenter* presenter = [[RNNViewControllerPresenter alloc] init];
148
-	RNNRootViewController* vc = [[RNNRootViewController alloc] initWithLayoutInfo:nil rootViewCreator:[[RNNTestRootViewCreator alloc] init] eventEmitter:nil presenter:presenter options:initialOptions defaultOptions:nil];
147
+	RNNComponentPresenter* presenter = [[RNNComponentPresenter alloc] init];
148
+	RNNComponentViewController* vc = [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:[[RNNTestRootViewCreator alloc] init] eventEmitter:nil presenter:presenter options:initialOptions defaultOptions:nil];
149
 	
149
 	
150
-	__unused RNNNavigationController* nav = [[RNNNavigationController alloc] initWithRootViewController:vc];
150
+	__unused RNNStackController* nav = [[RNNStackController alloc] initWithRootViewController:vc];
151
 	[vc viewWillAppear:false];
151
 	[vc viewWillAppear:false];
152
 	XCTAssertTrue([vc.navigationItem.title isEqual:@"the title"]);
152
 	XCTAssertTrue([vc.navigationItem.title isEqual:@"the title"]);
153
 	
153
 	
182
 
182
 
183
 - (void)testShowOverlay_withCreatedLayout {
183
 - (void)testShowOverlay_withCreatedLayout {
184
 	[self.uut setReadyToReceiveCommands:true];
184
 	[self.uut setReadyToReceiveCommands:true];
185
-	UIViewController* layoutVC = [RNNRootViewController new];
185
+	UIViewController* layoutVC = [RNNComponentViewController new];
186
 	OCMStub([self.controllerFactory createLayout:[OCMArg any]]).andReturn(layoutVC);
186
 	OCMStub([self.controllerFactory createLayout:[OCMArg any]]).andReturn(layoutVC);
187
 	
187
 	
188
 	[[self.overlayManager expect] showOverlayWindow:[OCMArg any]];
188
 	[[self.overlayManager expect] showOverlayWindow:[OCMArg any]];

+ 17
- 17
lib/ios/ReactNativeNavigationTests/RNNControllerFactoryTest.m View File

1
 
1
 
2
 #import <XCTest/XCTest.h>
2
 #import <XCTest/XCTest.h>
3
 #import "RNNControllerFactory.h"
3
 #import "RNNControllerFactory.h"
4
-#import "RNNRootViewController.h"
4
+#import "RNNComponentViewController.h"
5
 #import "RNNSideMenuController.h"
5
 #import "RNNSideMenuController.h"
6
 #import "RNNSideMenuChildVC.h"
6
 #import "RNNSideMenuChildVC.h"
7
-#import "RNNNavigationController.h"
8
-#import "RNNTabBarController.h"
7
+#import "RNNStackController.h"
8
+#import "RNNBottomTabsController.h"
9
 #import "RNNTopTabsViewController.h"
9
 #import "RNNTopTabsViewController.h"
10
 #import "RNNSplitViewController.h"
10
 #import "RNNSplitViewController.h"
11
 
11
 
12
 @interface RNNControllerFactoryTest : XCTestCase
12
 @interface RNNControllerFactoryTest : XCTestCase
13
 
13
 
14
-@property (nonatomic, strong) id<RNNRootViewCreator> creator;
14
+@property (nonatomic, strong) id<RNNComponentViewCreator> creator;
15
 @property (nonatomic, strong) RNNControllerFactory *factory;
15
 @property (nonatomic, strong) RNNControllerFactory *factory;
16
 @property (nonatomic, strong) RNNExternalComponentStore *store;
16
 @property (nonatomic, strong) RNNExternalComponentStore *store;
17
 
17
 
40
 							 @"data": @{},
40
 							 @"data": @{},
41
 							 @"children": @[]};
41
 							 @"children": @[]};
42
 	id ans = [self.factory createLayout:layout];
42
 	id ans = [self.factory createLayout:layout];
43
-	XCTAssertTrue([ans isMemberOfClass:[RNNRootViewController class]]);
43
+	XCTAssertTrue([ans isMemberOfClass:[RNNComponentViewController class]]);
44
 }
44
 }
45
 
45
 
46
 - (void)testCreateLayout_ExternalComponentLayout {
46
 - (void)testCreateLayout_ExternalComponentLayout {
53
 							  @"data": @{@"name": @"externalComponent"},
53
 							  @"data": @{@"name": @"externalComponent"},
54
 							  @"children": @[]};
54
 							  @"children": @[]};
55
 	id ans = [self.factory createLayout:layout];
55
 	id ans = [self.factory createLayout:layout];
56
-	XCTAssertTrue([ans isMemberOfClass:[RNNRootViewController class]]);
56
+	XCTAssertTrue([ans isMemberOfClass:[RNNComponentViewController class]]);
57
 }
57
 }
58
 
58
 
59
 - (void)testCreateLayout_ComponentStackLayout {
59
 - (void)testCreateLayout_ComponentStackLayout {
62
 							 @"data": @{},
62
 							 @"data": @{},
63
 							 @"children": @[]};
63
 							 @"children": @[]};
64
 	id ans = [self.factory createLayout:layout];
64
 	id ans = [self.factory createLayout:layout];
65
-	XCTAssertTrue([ans isMemberOfClass:[RNNNavigationController class]]);
65
+	XCTAssertTrue([ans isMemberOfClass:[RNNStackController class]]);
66
 }
66
 }
67
 
67
 
68
 - (void)testCreateLayout_SplitViewLayout {
68
 - (void)testCreateLayout_SplitViewLayout {
91
 									   @"type": @"Component",
91
 									   @"type": @"Component",
92
 									   @"data": @{},
92
 									   @"data": @{},
93
 									   @"children": @[]}]};
93
 									   @"children": @[]}]};
94
-	RNNNavigationController* ans = (RNNNavigationController*) [self.factory createLayout:layout];
94
+	RNNStackController* ans = (RNNStackController*) [self.factory createLayout:layout];
95
 	
95
 	
96
-	XCTAssertTrue([ans isMemberOfClass:[RNNNavigationController class]]);
96
+	XCTAssertTrue([ans isMemberOfClass:[RNNStackController class]]);
97
 	XCTAssertTrue(ans.childViewControllers.count == 1);
97
 	XCTAssertTrue(ans.childViewControllers.count == 1);
98
-	XCTAssertTrue([ans.childViewControllers[0] isMemberOfClass:[RNNRootViewController class]]);
98
+	XCTAssertTrue([ans.childViewControllers[0] isMemberOfClass:[RNNComponentViewController class]]);
99
 }
99
 }
100
 
100
 
101
 - (void)testCreateLayout_BottomTabsLayout {
101
 - (void)testCreateLayout_BottomTabsLayout {
112
 												 @"type": @"Component",
112
 												 @"type": @"Component",
113
 												 @"data": @{},
113
 												 @"data": @{},
114
 												 @"children": @[]}]}]};
114
 												 @"children": @[]}]}]};
115
-	RNNTabBarController* tabBar = (RNNTabBarController*) [self.factory createLayout:layout];
115
+	RNNBottomTabsController* tabBar = (RNNBottomTabsController*) [self.factory createLayout:layout];
116
 	
116
 	
117
-	XCTAssertTrue([tabBar isMemberOfClass:[RNNTabBarController class]]);
117
+	XCTAssertTrue([tabBar isMemberOfClass:[RNNBottomTabsController class]]);
118
 	XCTAssertTrue(tabBar.childViewControllers.count == 1);
118
 	XCTAssertTrue(tabBar.childViewControllers.count == 1);
119
-	XCTAssertTrue([tabBar.childViewControllers[0] isMemberOfClass:[RNNNavigationController class]]);
119
+	XCTAssertTrue([tabBar.childViewControllers[0] isMemberOfClass:[RNNStackController class]]);
120
 	
120
 	
121
 	UINavigationController *navController = tabBar.childViewControllers[0];
121
 	UINavigationController *navController = tabBar.childViewControllers[0];
122
 	XCTAssertTrue(navController.childViewControllers.count == 1);
122
 	XCTAssertTrue(navController.childViewControllers.count == 1);
123
-	XCTAssertTrue([navController.childViewControllers[0] isMemberOfClass:[RNNRootViewController class]]);
123
+	XCTAssertTrue([navController.childViewControllers[0] isMemberOfClass:[RNNComponentViewController class]]);
124
 }
124
 }
125
 
125
 
126
 - (void)testCreateLayout_TopTabsLayout {
126
 - (void)testCreateLayout_TopTabsLayout {
177
 	XCTAssertTrue([ans.center isMemberOfClass:[RNNSideMenuChildVC class]]);
177
 	XCTAssertTrue([ans.center isMemberOfClass:[RNNSideMenuChildVC class]]);
178
 	RNNSideMenuChildVC *center = (RNNSideMenuChildVC*)ans.center;
178
 	RNNSideMenuChildVC *center = (RNNSideMenuChildVC*)ans.center;
179
 	XCTAssertTrue(center.type == RNNSideMenuChildTypeCenter);
179
 	XCTAssertTrue(center.type == RNNSideMenuChildTypeCenter);
180
-	XCTAssertTrue([center.child isMemberOfClass:[RNNRootViewController class]]);
180
+	XCTAssertTrue([center.child isMemberOfClass:[RNNComponentViewController class]]);
181
 	
181
 	
182
 	RNNSideMenuChildVC *left = (RNNSideMenuChildVC*)ans.left;
182
 	RNNSideMenuChildVC *left = (RNNSideMenuChildVC*)ans.left;
183
 	XCTAssertTrue(left.type == RNNSideMenuChildTypeLeft);
183
 	XCTAssertTrue(left.type == RNNSideMenuChildTypeLeft);
184
-	XCTAssertTrue([left.child isMemberOfClass:[RNNRootViewController class]]);
184
+	XCTAssertTrue([left.child isMemberOfClass:[RNNComponentViewController class]]);
185
 	
185
 	
186
 	RNNSideMenuChildVC *right = (RNNSideMenuChildVC*)ans.right;
186
 	RNNSideMenuChildVC *right = (RNNSideMenuChildVC*)ans.right;
187
 	XCTAssertTrue(right.type == RNNSideMenuChildTypeRight);
187
 	XCTAssertTrue(right.type == RNNSideMenuChildTypeRight);
188
-	XCTAssertTrue([right.child isMemberOfClass:[RNNRootViewController class]]);
188
+	XCTAssertTrue([right.child isMemberOfClass:[RNNComponentViewController class]]);
189
 }
189
 }
190
 
190
 
191
 @end
191
 @end

+ 6
- 6
lib/ios/ReactNativeNavigationTests/RNNDotIndicatorPresenterTest.m View File

2
 #import <OCMock/OCMock.h>
2
 #import <OCMock/OCMock.h>
3
 #import "RNNDotIndicatorPresenter.h"
3
 #import "RNNDotIndicatorPresenter.h"
4
 #import "DotIndicatorOptions.h"
4
 #import "DotIndicatorOptions.h"
5
-#import "RNNTabBarController.h"
6
-#import "RNNRootViewController.h"
5
+#import "RNNBottomTabsController.h"
6
+#import "RNNComponentViewController.h"
7
 #import "RNNTestBase.h"
7
 #import "RNNTestBase.h"
8
 #import "UITabBarController+RNNUtils.h"
8
 #import "UITabBarController+RNNUtils.h"
9
 
9
 
10
 @interface RNNDotIndicatorPresenterTest : RNNTestBase
10
 @interface RNNDotIndicatorPresenterTest : RNNTestBase
11
 @property(nonatomic, strong) id uut;
11
 @property(nonatomic, strong) id uut;
12
-@property(nonatomic, strong) RNNRootViewController *child;
12
+@property(nonatomic, strong) RNNComponentViewController *child;
13
 @property(nonatomic, strong) id bottomTabs;
13
 @property(nonatomic, strong) id bottomTabs;
14
 @end
14
 @end
15
 
15
 
17
 - (void)setUp {
17
 - (void)setUp {
18
     [super setUp];
18
     [super setUp];
19
     self.uut = [OCMockObject partialMockForObject:[RNNDotIndicatorPresenter new]];
19
     self.uut = [OCMockObject partialMockForObject:[RNNDotIndicatorPresenter new]];
20
-    self.bottomTabs = [OCMockObject partialMockForObject:[RNNTabBarController new]];
20
+    self.bottomTabs = [OCMockObject partialMockForObject:[RNNBottomTabsController new]];
21
     self.child = [self createChild];
21
     self.child = [self createChild];
22
     [self.bottomTabs addChildViewController:self.child];
22
     [self.bottomTabs addChildViewController:self.child];
23
 
23
 
139
     [[self uut] apply:self.child :options];
139
     [[self uut] apply:self.child :options];
140
 }
140
 }
141
 
141
 
142
-- (RNNRootViewController *)createChild {
142
+- (RNNComponentViewController *)createChild {
143
     RNNNavigationOptions *options = [RNNNavigationOptions new];
143
     RNNNavigationOptions *options = [RNNNavigationOptions new];
144
     options.bottomTab = [RNNBottomTabOptions new];
144
     options.bottomTab = [RNNBottomTabOptions new];
145
     id img = [OCMockObject partialMockForObject:[UIImage new]];
145
     id img = [OCMockObject partialMockForObject:[UIImage new]];
146
 
146
 
147
     options.bottomTab.icon = [[Image alloc] initWithValue:img];
147
     options.bottomTab.icon = [[Image alloc] initWithValue:img];
148
-    return [[RNNRootViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[RNNViewControllerPresenter new] options:options defaultOptions:nil];
148
+    return [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[RNNComponentPresenter new] options:options defaultOptions:nil];
149
 }
149
 }
150
 
150
 
151
 - (BOOL)tabHasIndicator {
151
 - (BOOL)tabHasIndicator {

+ 7
- 7
lib/ios/ReactNativeNavigationTests/RNNModalManagerTest.m View File

1
 #import <XCTest/XCTest.h>
1
 #import <XCTest/XCTest.h>
2
 #import "RNNModalManager.h"
2
 #import "RNNModalManager.h"
3
-#import "RNNRootViewController.h"
3
+#import "RNNComponentViewController.h"
4
 
4
 
5
 @interface MockViewController : UIViewController
5
 @interface MockViewController : UIViewController
6
 
6
 
30
 @end
30
 @end
31
 
31
 
32
 @implementation RNNModalManagerTest {
32
 @implementation RNNModalManagerTest {
33
-	RNNRootViewController* _vc1;
34
-	RNNRootViewController* _vc2;
35
-	RNNRootViewController* _vc3;
33
+	RNNComponentViewController* _vc1;
34
+	RNNComponentViewController* _vc2;
35
+	RNNComponentViewController* _vc3;
36
 	MockModalManager* _modalManager;
36
 	MockModalManager* _modalManager;
37
 }
37
 }
38
 
38
 
39
 - (void)setUp {
39
 - (void)setUp {
40
 	[super setUp];
40
 	[super setUp];
41
-	_vc1 = [RNNRootViewController new];
42
-	_vc2 = [RNNRootViewController new];
43
-	_vc3 = [RNNRootViewController new];
41
+	_vc1 = [RNNComponentViewController new];
42
+	_vc2 = [RNNComponentViewController new];
43
+	_vc3 = [RNNComponentViewController new];
44
 	_modalManager = [[MockModalManager alloc] init];
44
 	_modalManager = [[MockModalManager alloc] init];
45
 	_modalManager.topPresentedVC = [MockViewController new];
45
 	_modalManager.topPresentedVC = [MockViewController new];
46
 }
46
 }

+ 13
- 13
lib/ios/ReactNativeNavigationTests/RNNNavigationControllerTest.m View File

1
 #import <XCTest/XCTest.h>
1
 #import <XCTest/XCTest.h>
2
 #import <OCMock/OCMock.h>
2
 #import <OCMock/OCMock.h>
3
-#import "RNNNavigationController.h"
4
-#import "RNNRootViewController.h"
3
+#import "RNNStackController.h"
4
+#import "RNNComponentViewController.h"
5
 #import "RNNTestRootViewCreator.h"
5
 #import "RNNTestRootViewCreator.h"
6
 
6
 
7
 @interface RNNNavigationControllerTest : XCTestCase
7
 @interface RNNNavigationControllerTest : XCTestCase
8
 
8
 
9
-@property (nonatomic, strong) RNNNavigationController *uut;
9
+@property (nonatomic, strong) RNNStackController *uut;
10
 
10
 
11
 @end
11
 @end
12
 
12
 
13
 @implementation RNNNavigationControllerTest {
13
 @implementation RNNNavigationControllerTest {
14
-	RNNRootViewController* _vc1;
14
+	RNNComponentViewController* _vc1;
15
 	id _vc2Mock;
15
 	id _vc2Mock;
16
-	RNNRootViewController* _vc2;
16
+	RNNComponentViewController* _vc2;
17
 	UIViewController* _vc3;
17
 	UIViewController* _vc3;
18
 	RNNNavigationOptions* _options;
18
 	RNNNavigationOptions* _options;
19
 	RNNTestRootViewCreator* _creator;
19
 	RNNTestRootViewCreator* _creator;
22
 - (void)setUp {
22
 - (void)setUp {
23
     [super setUp];
23
     [super setUp];
24
 	_creator = [[RNNTestRootViewCreator alloc] init];
24
 	_creator = [[RNNTestRootViewCreator alloc] init];
25
-	_vc1 = [[RNNRootViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[OCMockObject partialMockForObject:[[RNNViewControllerPresenter alloc] init]] options:[[RNNNavigationOptions alloc] initEmptyOptions]  defaultOptions:[[RNNNavigationOptions alloc] initEmptyOptions]];
26
-	_vc2 = [[RNNRootViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[[RNNViewControllerPresenter alloc] init] options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:[[RNNNavigationOptions alloc] initEmptyOptions]];
25
+	_vc1 = [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[OCMockObject partialMockForObject:[[RNNComponentPresenter alloc] init]] options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:[[RNNNavigationOptions alloc] initEmptyOptions]];
26
+	_vc2 = [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[[RNNComponentPresenter alloc] init] options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:[[RNNNavigationOptions alloc] initEmptyOptions]];
27
 	_vc2Mock = [OCMockObject partialMockForObject:_vc2];
27
 	_vc2Mock = [OCMockObject partialMockForObject:_vc2];
28
 	_vc3 = [UIViewController new];
28
 	_vc3 = [UIViewController new];
29
 	_options = [OCMockObject partialMockForObject:[[RNNNavigationOptions alloc] initEmptyOptions]];
29
 	_options = [OCMockObject partialMockForObject:[[RNNNavigationOptions alloc] initEmptyOptions]];
30
-	self.uut = [[RNNNavigationController alloc] initWithLayoutInfo:nil creator:_creator options:_options defaultOptions:nil presenter:[OCMockObject partialMockForObject:[[RNNNavigationControllerPresenter alloc] init]] eventEmitter:nil childViewControllers:@[_vc1, _vc2]];
30
+	self.uut = [[RNNStackController alloc] initWithLayoutInfo:nil creator:_creator options:_options defaultOptions:nil presenter:[OCMockObject partialMockForObject:[[RNNStackPresenter alloc] init]] eventEmitter:nil childViewControllers:@[_vc1, _vc2]];
31
 }
31
 }
32
 
32
 
33
 - (void)testInitWithLayoutInfo_shouldBindPresenter {
33
 - (void)testInitWithLayoutInfo_shouldBindPresenter {
35
 }
35
 }
36
 
36
 
37
 - (void)testInitWithLayoutInfo_shouldSetMultipleViewControllers {
37
 - (void)testInitWithLayoutInfo_shouldSetMultipleViewControllers {
38
-	self.uut = [[RNNNavigationController alloc] initWithLayoutInfo:nil creator:_creator options:[[RNNNavigationOptions alloc] initWithDict:@{}] defaultOptions:nil presenter:[[RNNViewControllerPresenter alloc] init] eventEmitter:nil childViewControllers:@[_vc1, _vc2]];
38
+	self.uut = [[RNNStackController alloc] initWithLayoutInfo:nil creator:_creator options:[[RNNNavigationOptions alloc] initWithDict:@{}] defaultOptions:nil presenter:[[RNNComponentPresenter alloc] init] eventEmitter:nil childViewControllers:@[_vc1, _vc2]];
39
 	XCTAssertTrue(self.uut.viewControllers.count == 2);
39
 	XCTAssertTrue(self.uut.viewControllers.count == 2);
40
 }
40
 }
41
 
41
 
113
 }
113
 }
114
 
114
 
115
 - (void)testPopViewControllerReturnLastChildViewController {
115
 - (void)testPopViewControllerReturnLastChildViewController {
116
-	RNNNavigationController* uut = [RNNNavigationController new];
116
+	RNNStackController* uut = [RNNStackController new];
117
 	[uut setViewControllers:@[_vc1, _vc2]];
117
 	[uut setViewControllers:@[_vc1, _vc2]];
118
 	XCTAssertEqual([uut popViewControllerAnimated:NO], _vc2);
118
 	XCTAssertEqual([uut popViewControllerAnimated:NO], _vc2);
119
 }
119
 }
135
 }
135
 }
136
 
136
 
137
 - (void)testPopViewControllerShouldInvokeApplyOptionsBeforePoppingForDestinationViewController {
137
 - (void)testPopViewControllerShouldInvokeApplyOptionsBeforePoppingForDestinationViewController {
138
-	RNNNavigationController* uut = [RNNNavigationController new];
138
+	RNNStackController* uut = [RNNStackController new];
139
 	[uut setViewControllers:@[_vc1, _vc2]];
139
 	[uut setViewControllers:@[_vc1, _vc2]];
140
 	
140
 	
141
 	[[(id)uut.presenter expect] applyOptionsBeforePopping:[OCMArg any]];
141
 	[[(id)uut.presenter expect] applyOptionsBeforePopping:[OCMArg any]];
190
 	XCTAssertNil(self.uut.navigationBar.barTintColor);
190
 	XCTAssertNil(self.uut.navigationBar.barTintColor);
191
 }
191
 }
192
 
192
 
193
-- (RNNNavigationController *)createNavigationControllerWithOptions:(RNNNavigationOptions *)options {
194
-	RNNNavigationController* nav = [[RNNNavigationController alloc] initWithLayoutInfo:nil creator:_creator options:options defaultOptions:nil presenter:[[RNNNavigationControllerPresenter alloc] init] eventEmitter:nil childViewControllers:@[_vc1]];
193
+- (RNNStackController *)createNavigationControllerWithOptions:(RNNNavigationOptions *)options {
194
+	RNNStackController* nav = [[RNNStackController alloc] initWithLayoutInfo:nil creator:_creator options:options defaultOptions:nil presenter:[[RNNStackPresenter alloc] init] eventEmitter:nil childViewControllers:@[_vc1]];
195
 	return nav;
195
 	return nav;
196
 }
196
 }
197
 
197
 

+ 7
- 7
lib/ios/ReactNativeNavigationTests/RNNNavigationStackManagerTest.m View File

1
 #import <XCTest/XCTest.h>
1
 #import <XCTest/XCTest.h>
2
 #import "RNNNavigationStackManager.h"
2
 #import "RNNNavigationStackManager.h"
3
-#import "RNNRootViewController.h"
4
-#import "RNNNavigationController.h"
3
+#import "RNNComponentViewController.h"
4
+#import "RNNStackController.h"
5
 
5
 
6
 @interface RNNNavigationStackManagerTest : XCTestCase
6
 @interface RNNNavigationStackManagerTest : XCTestCase
7
 
7
 
8
-@property (nonatomic, strong) RNNNavigationController *nvc;
8
+@property (nonatomic, strong) RNNStackController *nvc;
9
 @property (nonatomic, strong) UIViewController *vc1;
9
 @property (nonatomic, strong) UIViewController *vc1;
10
 @property (nonatomic, strong) UIViewController *vc2;
10
 @property (nonatomic, strong) UIViewController *vc2;
11
 @property (nonatomic, strong) UIViewController *vc3;
11
 @property (nonatomic, strong) UIViewController *vc3;
18
 - (void)setUp {
18
 - (void)setUp {
19
     [super setUp];
19
     [super setUp];
20
 	
20
 	
21
-	self.nvc = [[RNNNavigationController alloc] init];
22
-	self.vc1 = [RNNRootViewController new];
23
-	self.vc2 = [RNNRootViewController new];
24
-	self.vc3 = [RNNRootViewController new];
21
+	self.nvc = [[RNNStackController alloc] init];
22
+	self.vc1 = [RNNComponentViewController new];
23
+	self.vc2 = [RNNComponentViewController new];
24
+	self.vc3 = [RNNComponentViewController new];
25
 	self.stackManager = [RNNNavigationStackManager new];
25
 	self.stackManager = [RNNNavigationStackManager new];
26
 	
26
 	
27
 	NSArray *vcArray = @[self.vc1, self.vc2, self.vc3];
27
 	NSArray *vcArray = @[self.vc1, self.vc2, self.vc3];

+ 52
- 52
lib/ios/ReactNativeNavigationTests/RNNRootViewControllerTest.m View File

1
 #import <XCTest/XCTest.h>
1
 #import <XCTest/XCTest.h>
2
 #import <OCMock/OCMock.h>
2
 #import <OCMock/OCMock.h>
3
-#import "RNNRootViewController.h"
3
+#import "RNNComponentViewController.h"
4
 #import "RNNReactRootViewCreator.h"
4
 #import "RNNReactRootViewCreator.h"
5
 #import "RNNTestRootViewCreator.h"
5
 #import "RNNTestRootViewCreator.h"
6
 #import <React/RCTConvert.h>
6
 #import <React/RCTConvert.h>
7
 #import "RNNNavigationOptions.h"
7
 #import "RNNNavigationOptions.h"
8
-#import "RNNNavigationController.h"
9
-#import "RNNTabBarController.h"
8
+#import "RNNStackController.h"
9
+#import "RNNBottomTabsController.h"
10
 #import "RNNUIBarButtonItem.h"
10
 #import "RNNUIBarButtonItem.h"
11
 
11
 
12
 
12
 
13
-@interface RNNRootViewController (EmbedInTabBar)
13
+@interface RNNComponentViewController (EmbedInTabBar)
14
 - (void)embedInTabBarController;
14
 - (void)embedInTabBarController;
15
 @end
15
 @end
16
 
16
 
17
-@implementation RNNRootViewController (EmbedInTabBar)
17
+@implementation RNNComponentViewController (EmbedInTabBar)
18
 
18
 
19
 - (void)embedInTabBarController {
19
 - (void)embedInTabBarController {
20
-	RNNTabBarController* tabVC = [[RNNTabBarController alloc] init];
20
+	RNNBottomTabsController* tabVC = [[RNNBottomTabsController alloc] init];
21
 	tabVC.viewControllers = @[self];
21
 	tabVC.viewControllers = @[self];
22
 	[self viewWillAppear:false];
22
 	[self viewWillAppear:false];
23
 }
23
 }
26
 
26
 
27
 @interface RNNRootViewControllerTest : XCTestCase
27
 @interface RNNRootViewControllerTest : XCTestCase
28
 
28
 
29
-@property (nonatomic, strong) id<RNNRootViewCreator> creator;
29
+@property (nonatomic, strong) id<RNNComponentViewCreator> creator;
30
 @property (nonatomic, strong) NSString* pageName;
30
 @property (nonatomic, strong) NSString* pageName;
31
 @property (nonatomic, strong) NSString* componentId;
31
 @property (nonatomic, strong) NSString* componentId;
32
 @property (nonatomic, strong) id emitter;
32
 @property (nonatomic, strong) id emitter;
33
 @property (nonatomic, strong) RNNNavigationOptions* options;
33
 @property (nonatomic, strong) RNNNavigationOptions* options;
34
 @property (nonatomic, strong) RNNLayoutInfo* layoutInfo;
34
 @property (nonatomic, strong) RNNLayoutInfo* layoutInfo;
35
-@property (nonatomic, strong) RNNRootViewController* uut;
35
+@property (nonatomic, strong) RNNComponentViewController* uut;
36
 @end
36
 @end
37
 
37
 
38
 @implementation RNNRootViewControllerTest
38
 @implementation RNNRootViewControllerTest
49
 	layoutInfo.componentId = self.componentId;
49
 	layoutInfo.componentId = self.componentId;
50
 	layoutInfo.name = self.pageName;
50
 	layoutInfo.name = self.pageName;
51
 	
51
 	
52
-	id presenter = [OCMockObject partialMockForObject:[[RNNViewControllerPresenter alloc] init]];
53
-	self.uut = [[RNNRootViewController alloc] initWithLayoutInfo:layoutInfo rootViewCreator:self.creator eventEmitter:self.emitter presenter:presenter options:self.options defaultOptions:nil];
52
+	id presenter = [OCMockObject partialMockForObject:[[RNNComponentPresenter alloc] init]];
53
+	self.uut = [[RNNComponentViewController alloc] initWithLayoutInfo:layoutInfo rootViewCreator:self.creator eventEmitter:self.emitter presenter:presenter options:self.options defaultOptions:nil];
54
 }
54
 }
55
 
55
 
56
 -(void)testTopBarBackgroundColor_validColor{
56
 -(void)testTopBarBackgroundColor_validColor{
57
 	NSNumber* inputColor = @(0xFFFF0000);
57
 	NSNumber* inputColor = @(0xFFFF0000);
58
 	self.options.topBar.background.color = [[Color alloc] initWithValue:[RCTConvert UIColor:inputColor]];
58
 	self.options.topBar.background.color = [[Color alloc] initWithValue:[RCTConvert UIColor:inputColor]];
59
-	__unused RNNNavigationController* nav = [self createNavigationController];
59
+	__unused RNNStackController* nav = [self createNavigationController];
60
 	[self.uut viewWillAppear:false];
60
 	[self.uut viewWillAppear:false];
61
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
61
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
62
 
62
 
101
 - (void)testStatusBarHideWithTopBar_true {
101
 - (void)testStatusBarHideWithTopBar_true {
102
 	self.options.statusBar.hideWithTopBar = [[Bool alloc] initWithValue:@(1)];
102
 	self.options.statusBar.hideWithTopBar = [[Bool alloc] initWithValue:@(1)];
103
 	self.options.topBar.visible = [[Bool alloc] initWithValue:@(0)];
103
 	self.options.topBar.visible = [[Bool alloc] initWithValue:@(0)];
104
-	__unused RNNNavigationController* nav = [self createNavigationController];
104
+	__unused RNNStackController* nav = [self createNavigationController];
105
 
105
 
106
 	[self.uut viewWillAppear:false];
106
 	[self.uut viewWillAppear:false];
107
 
107
 
124
 -(void)testTopBarTextColor_validColor{
124
 -(void)testTopBarTextColor_validColor{
125
 	UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
125
 	UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
126
 	self.options.topBar.title.color = [[Color alloc] initWithValue:inputColor];
126
 	self.options.topBar.title.color = [[Color alloc] initWithValue:inputColor];
127
-	__unused RNNNavigationController* nav = [self createNavigationController];
127
+	__unused RNNStackController* nav = [self createNavigationController];
128
 	[self.uut viewWillAppear:false];
128
 	[self.uut viewWillAppear:false];
129
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
129
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
130
 	XCTAssertTrue([self.uut.navigationController.navigationBar.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
130
 	XCTAssertTrue([self.uut.navigationController.navigationBar.titleTextAttributes[@"NSColor"] isEqual:expectedColor]);
140
 
140
 
141
 -(void)testTopBarTextFontFamily_validFont{
141
 -(void)testTopBarTextFontFamily_validFont{
142
 	NSString* inputFont = @"HelveticaNeue";
142
 	NSString* inputFont = @"HelveticaNeue";
143
-	__unused RNNNavigationController* nav = [self createNavigationController];
143
+	__unused RNNStackController* nav = [self createNavigationController];
144
 	self.options.topBar.title.fontFamily = [[Text alloc] initWithValue:inputFont];
144
 	self.options.topBar.title.fontFamily = [[Text alloc] initWithValue:inputFont];
145
 	[self.uut viewWillAppear:false];
145
 	[self.uut viewWillAppear:false];
146
 	UIFont* expectedFont = [UIFont fontWithName:inputFont size:17];
146
 	UIFont* expectedFont = [UIFont fontWithName:inputFont size:17];
149
 
149
 
150
 -(void)testTopBarHideOnScroll_true {
150
 -(void)testTopBarHideOnScroll_true {
151
 	NSNumber* hideOnScrollInput = @(1);
151
 	NSNumber* hideOnScrollInput = @(1);
152
-	__unused RNNNavigationController* nav = [self createNavigationController];
152
+	__unused RNNStackController* nav = [self createNavigationController];
153
 	self.options.topBar.hideOnScroll = [[Bool alloc] initWithValue:hideOnScrollInput];;
153
 	self.options.topBar.hideOnScroll = [[Bool alloc] initWithValue:hideOnScrollInput];;
154
 	[self.uut viewWillAppear:false];
154
 	[self.uut viewWillAppear:false];
155
 	XCTAssertTrue(self.uut.navigationController.hidesBarsOnSwipe);
155
 	XCTAssertTrue(self.uut.navigationController.hidesBarsOnSwipe);
158
 -(void)testTopBarTranslucent {
158
 -(void)testTopBarTranslucent {
159
 	NSNumber* topBarTranslucentInput = @(0);
159
 	NSNumber* topBarTranslucentInput = @(0);
160
 	self.options.topBar.background.translucent = [[Bool alloc] initWithValue:topBarTranslucentInput];
160
 	self.options.topBar.background.translucent = [[Bool alloc] initWithValue:topBarTranslucentInput];
161
-	__unused RNNNavigationController* nav = [self createNavigationController];
161
+	__unused RNNStackController* nav = [self createNavigationController];
162
 	[self.uut viewWillAppear:false];
162
 	[self.uut viewWillAppear:false];
163
 	XCTAssertFalse(self.uut.navigationController.navigationBar.translucent);
163
 	XCTAssertFalse(self.uut.navigationController.navigationBar.translucent);
164
 }
164
 }
166
 -(void)testTabBadge {
166
 -(void)testTabBadge {
167
 	NSString* tabBadgeInput = @"5";
167
 	NSString* tabBadgeInput = @"5";
168
 	self.options.bottomTab.badge = [[Text alloc] initWithValue:tabBadgeInput];
168
 	self.options.bottomTab.badge = [[Text alloc] initWithValue:tabBadgeInput];
169
-	__unused RNNTabBarController* vc = [[RNNTabBarController alloc] init];
169
+	__unused RNNBottomTabsController* vc = [[RNNBottomTabsController alloc] init];
170
 	NSMutableArray* controllers = [NSMutableArray new];
170
 	NSMutableArray* controllers = [NSMutableArray new];
171
 	UITabBarItem* item = [[UITabBarItem alloc] initWithTitle:@"A Tab" image:nil tag:1];
171
 	UITabBarItem* item = [[UITabBarItem alloc] initWithTitle:@"A Tab" image:nil tag:1];
172
 	[self.uut setTabBarItem:item];
172
 	[self.uut setTabBarItem:item];
180
 -(void)testTopBarTransparent_BOOL_True {
180
 -(void)testTopBarTransparent_BOOL_True {
181
 	UIColor* transparentColor = [RCTConvert UIColor:@(0x00000000)];
181
 	UIColor* transparentColor = [RCTConvert UIColor:@(0x00000000)];
182
 	self.options.topBar.background.color = [[Color alloc] initWithValue:transparentColor];
182
 	self.options.topBar.background.color = [[Color alloc] initWithValue:transparentColor];
183
-	__unused RNNNavigationController* nav = [self createNavigationController];
183
+	__unused RNNStackController* nav = [self createNavigationController];
184
 	[self.uut viewWillAppear:false];
184
 	[self.uut viewWillAppear:false];
185
 	UIView* transparentView = [self.uut.navigationController.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG];
185
 	UIView* transparentView = [self.uut.navigationController.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG];
186
 	XCTAssertTrue(transparentView);
186
 	XCTAssertTrue(transparentView);
189
 
189
 
190
 -(void)testTopBarTransparent_BOOL_false {
190
 -(void)testTopBarTransparent_BOOL_false {
191
 	UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
191
 	UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
192
-	__unused RNNNavigationController* nav = [self createNavigationController];
192
+	__unused RNNStackController* nav = [self createNavigationController];
193
 	self.options.topBar.background.color = [[Color alloc] initWithValue:inputColor];
193
 	self.options.topBar.background.color = [[Color alloc] initWithValue:inputColor];
194
 	[self.uut viewWillAppear:false];
194
 	[self.uut viewWillAppear:false];
195
 	UIView* transparentView = [self.uut.navigationController.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG];
195
 	UIView* transparentView = [self.uut.navigationController.navigationBar viewWithTag:TOP_BAR_TRANSPARENT_TAG];
220
 -(void)testTopBarLargeTitleFontSize_withoutTextFontFamily_withoutTextColor {
220
 -(void)testTopBarLargeTitleFontSize_withoutTextFontFamily_withoutTextColor {
221
 	NSNumber* topBarTextFontSizeInput = @(15);
221
 	NSNumber* topBarTextFontSizeInput = @(15);
222
 	self.options.topBar.largeTitle.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
222
 	self.options.topBar.largeTitle.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
223
-	__unused RNNNavigationController* nav = [self createNavigationController];
223
+	__unused RNNStackController* nav = [self createNavigationController];
224
 	[self.uut viewWillAppear:false];
224
 	[self.uut viewWillAppear:false];
225
 	UIFont* expectedFont = [UIFont systemFontOfSize:15];
225
 	UIFont* expectedFont = [UIFont systemFontOfSize:15];
226
 
226
 
232
 	UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
232
 	UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
233
 	self.options.topBar.largeTitle.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
233
 	self.options.topBar.largeTitle.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
234
 	self.options.topBar.largeTitle.color = [[Color alloc] initWithValue:inputColor];
234
 	self.options.topBar.largeTitle.color = [[Color alloc] initWithValue:inputColor];
235
-	__unused RNNNavigationController* nav = [self createNavigationController];
235
+	__unused RNNStackController* nav = [self createNavigationController];
236
 	[self.uut viewWillAppear:false];
236
 	[self.uut viewWillAppear:false];
237
 	UIFont* expectedFont = [UIFont systemFontOfSize:15];
237
 	UIFont* expectedFont = [UIFont systemFontOfSize:15];
238
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
238
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
248
 	self.options.topBar.largeTitle.color = [[Color alloc] initWithValue:inputColor];
248
 	self.options.topBar.largeTitle.color = [[Color alloc] initWithValue:inputColor];
249
 	self.options.topBar.largeTitle.fontFamily = [[Text alloc] initWithValue:inputFont];
249
 	self.options.topBar.largeTitle.fontFamily = [[Text alloc] initWithValue:inputFont];
250
 	
250
 	
251
-	__unused RNNNavigationController* nav = [self createNavigationController];
251
+	__unused RNNStackController* nav = [self createNavigationController];
252
 	[self.uut viewWillAppear:false];
252
 	[self.uut viewWillAppear:false];
253
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
253
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
254
 	UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
254
 	UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
261
 	NSString* inputFont = @"HelveticaNeue";
261
 	NSString* inputFont = @"HelveticaNeue";
262
 	self.options.topBar.largeTitle.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
262
 	self.options.topBar.largeTitle.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
263
 	self.options.topBar.largeTitle.fontFamily = [[Text alloc] initWithValue:inputFont];
263
 	self.options.topBar.largeTitle.fontFamily = [[Text alloc] initWithValue:inputFont];
264
-	__unused RNNNavigationController* nav = [self createNavigationController];
264
+	__unused RNNStackController* nav = [self createNavigationController];
265
 	[self.uut viewWillAppear:false];
265
 	[self.uut viewWillAppear:false];
266
 	UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
266
 	UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
267
 	XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
267
 	XCTAssertTrue([self.uut.navigationController.navigationBar.largeTitleTextAttributes[@"NSFont"] isEqual:expectedFont]);
271
 -(void)testTopBarTextFontSize_withoutTextFontFamily_withoutTextColor {
271
 -(void)testTopBarTextFontSize_withoutTextFontFamily_withoutTextColor {
272
 	NSNumber* topBarTextFontSizeInput = @(15);
272
 	NSNumber* topBarTextFontSizeInput = @(15);
273
 	self.options.topBar.title.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
273
 	self.options.topBar.title.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
274
-	__unused RNNNavigationController* nav = [self createNavigationController];
274
+	__unused RNNStackController* nav = [self createNavigationController];
275
 	[self.uut viewWillAppear:false];
275
 	[self.uut viewWillAppear:false];
276
 	UIFont* expectedFont = [UIFont systemFontOfSize:15];
276
 	UIFont* expectedFont = [UIFont systemFontOfSize:15];
277
 	XCTAssertTrue([self.uut.navigationController.navigationBar.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
277
 	XCTAssertTrue([self.uut.navigationController.navigationBar.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
282
 	UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
282
 	UIColor* inputColor = [RCTConvert UIColor:@(0xFFFF0000)];
283
 	self.options.topBar.title.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
283
 	self.options.topBar.title.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
284
 	self.options.topBar.title.color = [[Color alloc] initWithValue:inputColor];
284
 	self.options.topBar.title.color = [[Color alloc] initWithValue:inputColor];
285
-	__unused RNNNavigationController* nav = [self createNavigationController];
285
+	__unused RNNStackController* nav = [self createNavigationController];
286
 	[self.uut viewWillAppear:false];
286
 	[self.uut viewWillAppear:false];
287
 	UIFont* expectedFont = [UIFont systemFontOfSize:15];
287
 	UIFont* expectedFont = [UIFont systemFontOfSize:15];
288
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
288
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
297
 	self.options.topBar.title.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
297
 	self.options.topBar.title.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
298
 	self.options.topBar.title.color = [[Color alloc] initWithValue:inputColor];
298
 	self.options.topBar.title.color = [[Color alloc] initWithValue:inputColor];
299
 	self.options.topBar.title.fontFamily = [[Text alloc] initWithValue:inputFont];
299
 	self.options.topBar.title.fontFamily = [[Text alloc] initWithValue:inputFont];
300
-	__unused RNNNavigationController* nav = [self createNavigationController];
300
+	__unused RNNStackController* nav = [self createNavigationController];
301
 	[self.uut viewWillAppear:false];
301
 	[self.uut viewWillAppear:false];
302
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
302
 	UIColor* expectedColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:1];
303
 	UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
303
 	UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
310
 	NSString* inputFont = @"HelveticaNeue";
310
 	NSString* inputFont = @"HelveticaNeue";
311
 	self.options.topBar.title.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
311
 	self.options.topBar.title.fontSize = [[Number alloc] initWithValue:topBarTextFontSizeInput];
312
 	self.options.topBar.title.fontFamily = [[Text alloc] initWithValue:inputFont];
312
 	self.options.topBar.title.fontFamily = [[Text alloc] initWithValue:inputFont];
313
-	__unused RNNNavigationController* nav = [self createNavigationController];
313
+	__unused RNNStackController* nav = [self createNavigationController];
314
 	[self.uut viewWillAppear:false];
314
 	[self.uut viewWillAppear:false];
315
 	UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
315
 	UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
316
 	XCTAssertTrue([self.uut.navigationController.navigationBar.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
316
 	XCTAssertTrue([self.uut.navigationController.navigationBar.titleTextAttributes[@"NSFont"] isEqual:expectedFont]);
319
 // TODO: Currently not passing
319
 // TODO: Currently not passing
320
 -(void)testTopBarTextFontFamily_invalidFont{
320
 -(void)testTopBarTextFontFamily_invalidFont{
321
 	NSString* inputFont = @"HelveticaNeueeeee";
321
 	NSString* inputFont = @"HelveticaNeueeeee";
322
-	__unused RNNNavigationController* nav = [self createNavigationController];
322
+	__unused RNNStackController* nav = [self createNavigationController];
323
 	self.options.topBar.title.fontFamily = [[Text alloc] initWithValue:inputFont];
323
 	self.options.topBar.title.fontFamily = [[Text alloc] initWithValue:inputFont];
324
 	//	XCTAssertThrows([self.uut viewWillAppear:false]);
324
 	//	XCTAssertThrows([self.uut viewWillAppear:false]);
325
 }
325
 }
327
 -(void)testOrientation_portrait {
327
 -(void)testOrientation_portrait {
328
 	NSArray* supportedOrientations = @[@"portrait"];
328
 	NSArray* supportedOrientations = @[@"portrait"];
329
 	self.options.layout.orientation = supportedOrientations;
329
 	self.options.layout.orientation = supportedOrientations;
330
-	__unused RNNNavigationController* nav = [self createNavigationController];
330
+	__unused RNNStackController* nav = [self createNavigationController];
331
 	[self.uut viewWillAppear:false];
331
 	[self.uut viewWillAppear:false];
332
 	UIInterfaceOrientationMask expectedOrientation = UIInterfaceOrientationMaskPortrait;
332
 	UIInterfaceOrientationMask expectedOrientation = UIInterfaceOrientationMaskPortrait;
333
 	XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
333
 	XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
336
 -(void)testOrientation_portraitString {
336
 -(void)testOrientation_portraitString {
337
 	NSString* supportedOrientation = @"portrait";
337
 	NSString* supportedOrientation = @"portrait";
338
 	self.options.layout.orientation = supportedOrientation;
338
 	self.options.layout.orientation = supportedOrientation;
339
-	__unused RNNNavigationController* nav = [self createNavigationController];
339
+	__unused RNNStackController* nav = [self createNavigationController];
340
 	[self.uut viewWillAppear:false];
340
 	[self.uut viewWillAppear:false];
341
 	UIInterfaceOrientationMask expectedOrientation = (UIInterfaceOrientationMaskPortrait);
341
 	UIInterfaceOrientationMask expectedOrientation = (UIInterfaceOrientationMaskPortrait);
342
 	XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
342
 	XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
345
 -(void)testOrientation_portraitAndLandscape {
345
 -(void)testOrientation_portraitAndLandscape {
346
 	NSArray* supportedOrientations = @[@"portrait", @"landscape"];
346
 	NSArray* supportedOrientations = @[@"portrait", @"landscape"];
347
 	self.options.layout.orientation = supportedOrientations;
347
 	self.options.layout.orientation = supportedOrientations;
348
-	__unused RNNNavigationController* nav = [self createNavigationController];
348
+	__unused RNNStackController* nav = [self createNavigationController];
349
 	[self.uut viewWillAppear:false];
349
 	[self.uut viewWillAppear:false];
350
 	UIInterfaceOrientationMask expectedOrientation = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscape);
350
 	UIInterfaceOrientationMask expectedOrientation = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscape);
351
 	XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
351
 	XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
354
 -(void)testOrientation_all {
354
 -(void)testOrientation_all {
355
 	NSArray* supportedOrientations = @[@"all"];
355
 	NSArray* supportedOrientations = @[@"all"];
356
 	self.options.layout.orientation = supportedOrientations;
356
 	self.options.layout.orientation = supportedOrientations;
357
-	__unused RNNNavigationController* nav = [self createNavigationController];
357
+	__unused RNNStackController* nav = [self createNavigationController];
358
 	[self.uut viewWillAppear:false];
358
 	[self.uut viewWillAppear:false];
359
 	UIInterfaceOrientationMask expectedOrientation = UIInterfaceOrientationMaskAll;
359
 	UIInterfaceOrientationMask expectedOrientation = UIInterfaceOrientationMaskAll;
360
 	XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
360
 	XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
363
 -(void)testOrientation_default {
363
 -(void)testOrientation_default {
364
 	NSString* supportedOrientations = @"default";
364
 	NSString* supportedOrientations = @"default";
365
 	self.options.layout.orientation = supportedOrientations;
365
 	self.options.layout.orientation = supportedOrientations;
366
-	__unused RNNNavigationController* nav = [self createNavigationController];
366
+	__unused RNNStackController* nav = [self createNavigationController];
367
 	[self.uut viewWillAppear:false];
367
 	[self.uut viewWillAppear:false];
368
 	UIInterfaceOrientationMask expectedOrientation = [[UIApplication sharedApplication] supportedInterfaceOrientationsForWindow:[[UIApplication sharedApplication] keyWindow]];
368
 	UIInterfaceOrientationMask expectedOrientation = [[UIApplication sharedApplication] supportedInterfaceOrientationsForWindow:[[UIApplication sharedApplication] keyWindow]];
369
 	XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
369
 	XCTAssertTrue(self.uut.navigationController.supportedInterfaceOrientations == expectedOrientation);
374
 	NSArray* supportedOrientations = @[@"portrait"];
374
 	NSArray* supportedOrientations = @[@"portrait"];
375
 	self.options.layout.orientation = supportedOrientations;
375
 	self.options.layout.orientation = supportedOrientations;
376
 	NSMutableArray* controllers = [[NSMutableArray alloc] initWithArray:@[self.uut]];
376
 	NSMutableArray* controllers = [[NSMutableArray alloc] initWithArray:@[self.uut]];
377
-    __unused RNNTabBarController* vc = [[RNNTabBarController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:[RNNViewControllerPresenter new] eventEmitter:nil childViewControllers:controllers];
377
+    __unused RNNBottomTabsController* vc = [[RNNBottomTabsController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:[RNNComponentPresenter new] eventEmitter:nil childViewControllers:controllers];
378
 
378
 
379
 	[self.uut viewWillAppear:false];
379
 	[self.uut viewWillAppear:false];
380
 
380
 
386
 	NSArray* supportedOrientations = @[@"portrait", @"landscape"];
386
 	NSArray* supportedOrientations = @[@"portrait", @"landscape"];
387
 	self.options.layout.orientation = supportedOrientations;
387
 	self.options.layout.orientation = supportedOrientations;
388
     NSMutableArray* controllers = [[NSMutableArray alloc] initWithArray:@[self.uut]];
388
     NSMutableArray* controllers = [[NSMutableArray alloc] initWithArray:@[self.uut]];
389
-    __unused RNNTabBarController* vc = [[RNNTabBarController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:[RNNViewControllerPresenter new] eventEmitter:nil childViewControllers:controllers];
389
+    __unused RNNBottomTabsController* vc = [[RNNBottomTabsController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:[RNNComponentPresenter new] eventEmitter:nil childViewControllers:controllers];
390
 
390
 
391
 	[self.uut viewWillAppear:false];
391
 	[self.uut viewWillAppear:false];
392
 
392
 
398
 	NSArray* supportedOrientations = @[@"all"];
398
 	NSArray* supportedOrientations = @[@"all"];
399
 	self.options.layout.orientation = supportedOrientations;
399
 	self.options.layout.orientation = supportedOrientations;
400
 	NSMutableArray* controllers = [[NSMutableArray alloc] initWithArray:@[self.uut]];
400
 	NSMutableArray* controllers = [[NSMutableArray alloc] initWithArray:@[self.uut]];
401
-	__unused RNNTabBarController* vc = [[RNNTabBarController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:[RNNViewControllerPresenter new] eventEmitter:nil childViewControllers:controllers];
401
+	__unused RNNBottomTabsController* vc = [[RNNBottomTabsController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:[RNNComponentPresenter new] eventEmitter:nil childViewControllers:controllers];
402
 
402
 
403
 	[self.uut viewWillAppear:false];
403
 	[self.uut viewWillAppear:false];
404
 
404
 
408
 
408
 
409
 -(void)testRightButtonsWithTitle_withoutStyle {
409
 -(void)testRightButtonsWithTitle_withoutStyle {
410
 	self.options.topBar.rightButtons = @[@{@"id": @"testId", @"text": @"test"}];
410
 	self.options.topBar.rightButtons = @[@{@"id": @"testId", @"text": @"test"}];
411
-	self.uut = [[RNNRootViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[RNNViewControllerPresenter new] options:self.options defaultOptions:nil];
412
-	RNNNavigationController* nav = [[RNNNavigationController alloc] initWithLayoutInfo:nil creator:_creator options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewControllers:@[self.uut]];
411
+	self.uut = [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[RNNComponentPresenter new] options:self.options defaultOptions:nil];
412
+	RNNStackController* nav = [[RNNStackController alloc] initWithLayoutInfo:nil creator:_creator options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewControllers:@[self.uut]];
413
 
413
 
414
 	RNNUIBarButtonItem* button = (RNNUIBarButtonItem*) nav.topViewController.navigationItem.rightBarButtonItems[0];
414
 	RNNUIBarButtonItem* button = (RNNUIBarButtonItem*) nav.topViewController.navigationItem.rightBarButtonItems[0];
415
 	NSString* expectedButtonId = @"testId";
415
 	NSString* expectedButtonId = @"testId";
423
 	NSNumber* inputColor = @(0xFFFF0000);
423
 	NSNumber* inputColor = @(0xFFFF0000);
424
 
424
 
425
 	self.options.topBar.rightButtons = @[@{@"id": @"testId", @"text": @"test", @"enabled": @false, @"buttonColor": inputColor, @"buttonFontSize": @22, @"buttonFontWeight": @"800"}];
425
 	self.options.topBar.rightButtons = @[@{@"id": @"testId", @"text": @"test", @"enabled": @false, @"buttonColor": inputColor, @"buttonFontSize": @22, @"buttonFontWeight": @"800"}];
426
-	self.uut = [[RNNRootViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[RNNViewControllerPresenter new] options:self.options defaultOptions:nil];
427
-	RNNNavigationController* nav = [[RNNNavigationController alloc] initWithLayoutInfo:nil creator:_creator options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewControllers:@[self.uut]];
426
+	self.uut = [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[RNNComponentPresenter new] options:self.options defaultOptions:nil];
427
+	RNNStackController* nav = [[RNNStackController alloc] initWithLayoutInfo:nil creator:_creator options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewControllers:@[self.uut]];
428
 
428
 
429
 	RNNUIBarButtonItem* button = (RNNUIBarButtonItem*)[nav.topViewController.navigationItem.rightBarButtonItems objectAtIndex:0];
429
 	RNNUIBarButtonItem* button = (RNNUIBarButtonItem*)[nav.topViewController.navigationItem.rightBarButtonItems objectAtIndex:0];
430
 	NSString* expectedButtonId = @"testId";
430
 	NSString* expectedButtonId = @"testId";
438
 
438
 
439
 -(void)testLeftButtonsWithTitle_withoutStyle {
439
 -(void)testLeftButtonsWithTitle_withoutStyle {
440
 	self.options.topBar.leftButtons = @[@{@"id": @"testId", @"text": @"test"}];
440
 	self.options.topBar.leftButtons = @[@{@"id": @"testId", @"text": @"test"}];
441
-	self.uut = [[RNNRootViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[RNNViewControllerPresenter new] options:self.options defaultOptions:nil];
442
-	RNNNavigationController* nav = [[RNNNavigationController alloc] initWithLayoutInfo:nil creator:_creator options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewControllers:@[self.uut]];
441
+	self.uut = [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[RNNComponentPresenter new] options:self.options defaultOptions:nil];
442
+	RNNStackController* nav = [[RNNStackController alloc] initWithLayoutInfo:nil creator:_creator options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewControllers:@[self.uut]];
443
 	
443
 	
444
 	RNNUIBarButtonItem* button = (RNNUIBarButtonItem*)[nav.topViewController.navigationItem.leftBarButtonItems objectAtIndex:0];
444
 	RNNUIBarButtonItem* button = (RNNUIBarButtonItem*)[nav.topViewController.navigationItem.leftBarButtonItems objectAtIndex:0];
445
 	NSString* expectedButtonId = @"testId";
445
 	NSString* expectedButtonId = @"testId";
453
 	NSNumber* inputColor = @(0xFFFF0000);
453
 	NSNumber* inputColor = @(0xFFFF0000);
454
 
454
 
455
 	self.options.topBar.leftButtons = @[@{@"id": @"testId", @"text": @"test", @"enabled": @false, @"buttonColor": inputColor, @"buttonFontSize": @22, @"buttonFontWeight": @"800"}];
455
 	self.options.topBar.leftButtons = @[@{@"id": @"testId", @"text": @"test", @"enabled": @false, @"buttonColor": inputColor, @"buttonFontSize": @22, @"buttonFontWeight": @"800"}];
456
-	self.uut = [[RNNRootViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[RNNViewControllerPresenter new] options:self.options defaultOptions:nil];
457
-	RNNNavigationController* nav = [[RNNNavigationController alloc] initWithLayoutInfo:nil creator:_creator options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewControllers:@[self.uut]];
456
+	self.uut = [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:[RNNComponentPresenter new] options:self.options defaultOptions:nil];
457
+	RNNStackController* nav = [[RNNStackController alloc] initWithLayoutInfo:nil creator:_creator options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewControllers:@[self.uut]];
458
 
458
 
459
 	RNNUIBarButtonItem* button = (RNNUIBarButtonItem*)[nav.topViewController.navigationItem.leftBarButtonItems objectAtIndex:0];
459
 	RNNUIBarButtonItem* button = (RNNUIBarButtonItem*)[nav.topViewController.navigationItem.leftBarButtonItems objectAtIndex:0];
460
 	NSString* expectedButtonId = @"testId";
460
 	NSString* expectedButtonId = @"testId";
469
 -(void)testTopBarNoBorderOn {
469
 -(void)testTopBarNoBorderOn {
470
 	NSNumber* topBarNoBorderInput = @(1);
470
 	NSNumber* topBarNoBorderInput = @(1);
471
 	self.options.topBar.noBorder = [[Bool alloc] initWithValue:topBarNoBorderInput];
471
 	self.options.topBar.noBorder = [[Bool alloc] initWithValue:topBarNoBorderInput];
472
-	__unused RNNNavigationController* nav = [self createNavigationController];
472
+	__unused RNNStackController* nav = [self createNavigationController];
473
 	[self.uut viewWillAppear:false];
473
 	[self.uut viewWillAppear:false];
474
 	XCTAssertNotNil(self.uut.navigationController.navigationBar.shadowImage);
474
 	XCTAssertNotNil(self.uut.navigationController.navigationBar.shadowImage);
475
 }
475
 }
477
 -(void)testTopBarNoBorderOff {
477
 -(void)testTopBarNoBorderOff {
478
 	NSNumber* topBarNoBorderInput = @(0);
478
 	NSNumber* topBarNoBorderInput = @(0);
479
 	self.options.topBar.noBorder = [[Bool alloc] initWithValue:topBarNoBorderInput];
479
 	self.options.topBar.noBorder = [[Bool alloc] initWithValue:topBarNoBorderInput];
480
-	__unused RNNNavigationController* nav = [self createNavigationController];
480
+	__unused RNNStackController* nav = [self createNavigationController];
481
 	[self.uut viewWillAppear:false];
481
 	[self.uut viewWillAppear:false];
482
 	XCTAssertNil(self.uut.navigationController.navigationBar.shadowImage);
482
 	XCTAssertNil(self.uut.navigationController.navigationBar.shadowImage);
483
 }
483
 }
510
 }
510
 }
511
 
511
 
512
 -(void)testTopBarBlur_default {
512
 -(void)testTopBarBlur_default {
513
-	__unused RNNNavigationController* nav = [self createNavigationController];
513
+	__unused RNNStackController* nav = [self createNavigationController];
514
 	[self.uut viewWillAppear:false];
514
 	[self.uut viewWillAppear:false];
515
 	XCTAssertNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);
515
 	XCTAssertNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);
516
 }
516
 }
518
 -(void)testTopBarBlur_false {
518
 -(void)testTopBarBlur_false {
519
 	NSNumber* topBarBlurInput = @(0);
519
 	NSNumber* topBarBlurInput = @(0);
520
 	self.options.topBar.background.blur = [[Bool alloc] initWithValue:topBarBlurInput];
520
 	self.options.topBar.background.blur = [[Bool alloc] initWithValue:topBarBlurInput];
521
-	__unused RNNNavigationController* nav = [self createNavigationController];
521
+	__unused RNNStackController* nav = [self createNavigationController];
522
 	[self.uut viewWillAppear:false];
522
 	[self.uut viewWillAppear:false];
523
 	XCTAssertNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);
523
 	XCTAssertNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);
524
 }
524
 }
526
 -(void)testTopBarBlur_true {
526
 -(void)testTopBarBlur_true {
527
 	NSNumber* topBarBlurInput = @(1);
527
 	NSNumber* topBarBlurInput = @(1);
528
 	self.options.topBar.background.blur = [[Bool alloc] initWithValue:topBarBlurInput];
528
 	self.options.topBar.background.blur = [[Bool alloc] initWithValue:topBarBlurInput];
529
-	__unused RNNNavigationController* nav = [self createNavigationController];
529
+	__unused RNNStackController* nav = [self createNavigationController];
530
 	[self.uut viewWillAppear:false];
530
 	[self.uut viewWillAppear:false];
531
 	XCTAssertNotNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);
531
 	XCTAssertNotNil([self.uut.navigationController.navigationBar viewWithTag:BLUR_TOPBAR_TAG]);
532
 }
532
 }
541
 
541
 
542
 - (void)testMergeOptionsShouldCallPresenterMergeOptions {
542
 - (void)testMergeOptionsShouldCallPresenterMergeOptions {
543
 	RNNNavigationOptions* newOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
543
 	RNNNavigationOptions* newOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
544
-	[[(id)self.uut.presenter expect] mergeOptions:newOptions currentOptions:self.uut.options];
544
+    [[(id) self.uut.presenter expect] mergeOptions:newOptions resolvedOptions:self.uut.options];
545
 	[self.uut mergeOptions:newOptions];
545
 	[self.uut mergeOptions:newOptions];
546
 	[(id)self.uut.presenter verify];
546
 	[(id)self.uut.presenter verify];
547
 }
547
 }
557
 #pragma mark BottomTabs
557
 #pragma mark BottomTabs
558
 
558
 
559
 
559
 
560
-- (RNNNavigationController *)createNavigationController {
561
-	RNNNavigationController* nav = [[RNNNavigationController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:[[RNNNavigationControllerPresenter alloc] init] eventEmitter:nil childViewControllers:@[self.uut]];
560
+- (RNNStackController *)createNavigationController {
561
+	RNNStackController* nav = [[RNNStackController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:[[RNNStackPresenter alloc] init] eventEmitter:nil childViewControllers:@[self.uut]];
562
 	
562
 	
563
 	return nav;
563
 	return nav;
564
 }
564
 }

+ 4
- 4
lib/ios/ReactNativeNavigationTests/RNNSideMenuControllerTest.m View File

1
 #import <XCTest/XCTest.h>
1
 #import <XCTest/XCTest.h>
2
 #import "RNNSideMenuController.h"
2
 #import "RNNSideMenuController.h"
3
-#import "RNNRootViewController.h"
3
+#import "RNNComponentViewController.h"
4
 
4
 
5
 @interface RNNSideMenuControllerTest : XCTestCase
5
 @interface RNNSideMenuControllerTest : XCTestCase
6
 @property (nonatomic, strong) RNNSideMenuController *uut;
6
 @property (nonatomic, strong) RNNSideMenuController *uut;
13
 
13
 
14
 - (void)setUp {
14
 - (void)setUp {
15
     [super setUp];
15
     [super setUp];
16
-	_leftVC = [[RNNSideMenuChildVC alloc] initWithLayoutInfo:nil creator:nil options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewController:[RNNRootViewController new] type:RNNSideMenuChildTypeLeft];
17
-	_rightVC = [[RNNSideMenuChildVC alloc] initWithLayoutInfo:nil creator:nil options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewController:[RNNRootViewController new] type:RNNSideMenuChildTypeRight];
18
-	_centerVC =[[RNNSideMenuChildVC alloc] initWithLayoutInfo:nil creator:nil options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewController:[RNNRootViewController new] type:RNNSideMenuChildTypeCenter];
16
+	_leftVC = [[RNNSideMenuChildVC alloc] initWithLayoutInfo:nil creator:nil options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewController:[RNNComponentViewController new] type:RNNSideMenuChildTypeLeft];
17
+	_rightVC = [[RNNSideMenuChildVC alloc] initWithLayoutInfo:nil creator:nil options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewController:[RNNComponentViewController new] type:RNNSideMenuChildTypeRight];
18
+	_centerVC =[[RNNSideMenuChildVC alloc] initWithLayoutInfo:nil creator:nil options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewController:[RNNComponentViewController new] type:RNNSideMenuChildTypeCenter];
19
 	self.uut = [[RNNSideMenuController alloc] initWithLayoutInfo:nil creator:nil childViewControllers:@[_leftVC, _centerVC, _rightVC] options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:nil eventEmitter:nil];
19
 	self.uut = [[RNNSideMenuController alloc] initWithLayoutInfo:nil creator:nil childViewControllers:@[_leftVC, _centerVC, _rightVC] options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:nil eventEmitter:nil];
20
 }
20
 }
21
 
21
 

lib/ios/ReactNativeNavigationTests/RNNNavigationControllerPresenterTest.m → lib/ios/ReactNativeNavigationTests/RNNStackPresenterTest.m View File

1
 #import <XCTest/XCTest.h>
1
 #import <XCTest/XCTest.h>
2
 #import <OCMock/OCMock.h>
2
 #import <OCMock/OCMock.h>
3
-#import "RNNNavigationControllerPresenter.h"
3
+#import "RNNStackPresenter.h"
4
 #import "UINavigationController+RNNOptions.h"
4
 #import "UINavigationController+RNNOptions.h"
5
-#import "RNNNavigationController.h"
5
+#import "RNNStackController.h"
6
 
6
 
7
-@interface RNNNavigationControllerPresenterTest : XCTestCase
7
+@interface RNNStackPresenterTest : XCTestCase
8
 
8
 
9
-@property (nonatomic, strong) RNNNavigationControllerPresenter *uut;
9
+@property (nonatomic, strong) RNNStackPresenter *uut;
10
 @property (nonatomic, strong) RNNNavigationOptions *options;
10
 @property (nonatomic, strong) RNNNavigationOptions *options;
11
-@property (nonatomic, strong) id bindedViewController;
11
+@property (nonatomic, strong) id boundViewController;
12
 
12
 
13
 @end
13
 @end
14
 
14
 
15
-@implementation RNNNavigationControllerPresenterTest
15
+@implementation RNNStackPresenterTest
16
 
16
 
17
 - (void)setUp {
17
 - (void)setUp {
18
 	[super setUp];
18
 	[super setUp];
19
-	self.uut = [[RNNNavigationControllerPresenter alloc] init];
20
-	self.bindedViewController = [OCMockObject partialMockForObject:[RNNNavigationController new]];
21
-	[self.uut bindViewController:self.bindedViewController];
19
+	self.uut = [[RNNStackPresenter alloc] init];
20
+	self.boundViewController = [OCMockObject partialMockForObject:[RNNStackController new]];
21
+	[self.uut bindViewController:self.boundViewController];
22
 	self.options = [[RNNNavigationOptions alloc] initEmptyOptions];
22
 	self.options = [[RNNNavigationOptions alloc] initEmptyOptions];
23
 }
23
 }
24
 
24
 
25
 - (void)testApplyOptions_shouldSetBackButtonColor_withDefaultValues {
25
 - (void)testApplyOptions_shouldSetBackButtonColor_withDefaultValues {
26
-	[[_bindedViewController expect] rnn_setBackButtonColor:nil];
26
+	[[_boundViewController expect] setBackButtonColor:nil];
27
 	[self.uut applyOptions:self.options];
27
 	[self.uut applyOptions:self.options];
28
-	[_bindedViewController verify];
28
+	[_boundViewController verify];
29
 }
29
 }
30
 
30
 
31
 - (void)testApplyOptions_shouldSetBackButtonColor_withColor {
31
 - (void)testApplyOptions_shouldSetBackButtonColor_withColor {
32
 	self.options.topBar.backButton.color = [[Color alloc] initWithValue:[UIColor redColor]];
32
 	self.options.topBar.backButton.color = [[Color alloc] initWithValue:[UIColor redColor]];
33
-	[[_bindedViewController expect] rnn_setBackButtonColor:[UIColor redColor]];
33
+	[[_boundViewController expect] setBackButtonColor:[UIColor redColor]];
34
 	[self.uut applyOptions:self.options];
34
 	[self.uut applyOptions:self.options];
35
-	[_bindedViewController verify];
35
+	[_boundViewController verify];
36
 }
36
 }
37
 
37
 
38
 - (void)testApplyOptionsBeforePoppingShouldSetTopBarBackgroundForPoppingViewController {
38
 - (void)testApplyOptionsBeforePoppingShouldSetTopBarBackgroundForPoppingViewController {
39
 	_options.topBar.background.color = [[Color alloc] initWithValue:[UIColor redColor]];
39
 	_options.topBar.background.color = [[Color alloc] initWithValue:[UIColor redColor]];
40
 	
40
 	
41
-	[[_bindedViewController expect] setTopBarBackgroundColor:_options.topBar.background.color.get];
41
+	[[_boundViewController expect] setTopBarBackgroundColor:_options.topBar.background.color.get];
42
 	[self.uut applyOptionsBeforePopping:self.options];
42
 	[self.uut applyOptionsBeforePopping:self.options];
43
-	[_bindedViewController verify];
43
+	[_boundViewController verify];
44
 }
44
 }
45
 
45
 
46
 - (void)testApplyOptionsBeforePoppingShouldSetLargeTitleForPoppingViewController {
46
 - (void)testApplyOptionsBeforePoppingShouldSetLargeTitleForPoppingViewController {

+ 24
- 24
lib/ios/ReactNativeNavigationTests/RNNTabBarControllerTest.m View File

1
 #import <XCTest/XCTest.h>
1
 #import <XCTest/XCTest.h>
2
-#import "RNNTabBarController.h"
3
-#import "RNNRootViewController.h"
4
-#import "RNNNavigationController.h"
2
+#import "RNNBottomTabsController.h"
3
+#import "RNNComponentViewController.h"
4
+#import "RNNStackController.h"
5
 #import <OCMock/OCMock.h>
5
 #import <OCMock/OCMock.h>
6
 
6
 
7
 @interface RNNTabBarControllerTest : XCTestCase
7
 @interface RNNTabBarControllerTest : XCTestCase
8
 
8
 
9
-@property(nonatomic, strong) RNNTabBarController * uut;
9
+@property(nonatomic, strong) RNNBottomTabsController * uut;
10
 @property(nonatomic, strong) id mockChildViewController;
10
 @property(nonatomic, strong) id mockChildViewController;
11
 @property(nonatomic, strong) id mockEventEmitter;
11
 @property(nonatomic, strong) id mockEventEmitter;
12
 @property(nonatomic, strong) id mockTabBarPresenter;
12
 @property(nonatomic, strong) id mockTabBarPresenter;
18
 - (void)setUp {
18
 - (void)setUp {
19
     [super setUp];
19
     [super setUp];
20
 
20
 
21
-    id tabBarClassMock = OCMClassMock([RNNTabBarController class]);
22
-    OCMStub([tabBarClassMock parentViewController]).andReturn([OCMockObject partialMockForObject:[RNNTabBarController new]]);
21
+    id tabBarClassMock = OCMClassMock([RNNBottomTabsController class]);
22
+    OCMStub([tabBarClassMock parentViewController]).andReturn([OCMockObject partialMockForObject:[RNNBottomTabsController new]]);
23
 
23
 
24
-    self.mockTabBarPresenter = [OCMockObject partialMockForObject:[[RNNTabBarPresenter alloc] init]];
25
-    self.mockChildViewController = [OCMockObject partialMockForObject:[RNNRootViewController new]];
24
+    self.mockTabBarPresenter = [OCMockObject partialMockForObject:[[RNNBottomTabsPresenter alloc] init]];
25
+    self.mockChildViewController = [OCMockObject partialMockForObject:[RNNComponentViewController new]];
26
     self.mockEventEmitter = [OCMockObject partialMockForObject:[RNNEventEmitter new]];
26
     self.mockEventEmitter = [OCMockObject partialMockForObject:[RNNEventEmitter new]];
27
-    self.uut = [OCMockObject partialMockForObject:[[RNNTabBarController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initWithDict:@{}] defaultOptions:nil presenter:self.mockTabBarPresenter eventEmitter:self.mockEventEmitter childViewControllers:@[[[UIViewController alloc] init]]]];
27
+    self.uut = [OCMockObject partialMockForObject:[[RNNBottomTabsController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initWithDict:@{}] defaultOptions:nil presenter:self.mockTabBarPresenter eventEmitter:self.mockEventEmitter childViewControllers:@[[[UIViewController alloc] init]]]];
28
     OCMStub([self.uut selectedViewController]).andReturn(self.mockChildViewController);
28
     OCMStub([self.uut selectedViewController]).andReturn(self.mockChildViewController);
29
 }
29
 }
30
 
30
 
36
     UIViewController *vc1 = [[UIViewController alloc] init];
36
     UIViewController *vc1 = [[UIViewController alloc] init];
37
     UIViewController *vc2 = [[UIViewController alloc] init];
37
     UIViewController *vc2 = [[UIViewController alloc] init];
38
 
38
 
39
-    RNNTabBarController *uut = [[RNNTabBarController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initWithDict:@{}] defaultOptions:nil presenter:[[RNNViewControllerPresenter alloc] init] eventEmitter:nil childViewControllers:@[vc1, vc2]];
39
+    RNNBottomTabsController *uut = [[RNNBottomTabsController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initWithDict:@{}] defaultOptions:nil presenter:[[RNNComponentPresenter alloc] init] eventEmitter:nil childViewControllers:@[vc1, vc2]];
40
     XCTAssertTrue(uut.viewControllers.count == 2);
40
     XCTAssertTrue(uut.viewControllers.count == 2);
41
 }
41
 }
42
 
42
 
43
 - (void)testInitWithLayoutInfo_shouldInitializeDependencies {
43
 - (void)testInitWithLayoutInfo_shouldInitializeDependencies {
44
     RNNLayoutInfo *layoutInfo = [RNNLayoutInfo new];
44
     RNNLayoutInfo *layoutInfo = [RNNLayoutInfo new];
45
     RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:@{}];
45
     RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:@{}];
46
-    RNNTabBarPresenter *presenter = [[RNNTabBarPresenter alloc] init];
46
+    RNNBottomTabsPresenter *presenter = [[RNNBottomTabsPresenter alloc] init];
47
     NSArray *childViewControllers = @[[UIViewController new]];
47
     NSArray *childViewControllers = @[[UIViewController new]];
48
 
48
 
49
-    RNNTabBarController *uut = [[RNNTabBarController alloc] initWithLayoutInfo:layoutInfo creator:nil options:options defaultOptions:nil presenter:presenter eventEmitter:nil childViewControllers:childViewControllers];
49
+    RNNBottomTabsController *uut = [[RNNBottomTabsController alloc] initWithLayoutInfo:layoutInfo creator:nil options:options defaultOptions:nil presenter:presenter eventEmitter:nil childViewControllers:childViewControllers];
50
     XCTAssertTrue(uut.layoutInfo == layoutInfo);
50
     XCTAssertTrue(uut.layoutInfo == layoutInfo);
51
     XCTAssertTrue(uut.options == options);
51
     XCTAssertTrue(uut.options == options);
52
     XCTAssertTrue(uut.presenter == presenter);
52
     XCTAssertTrue(uut.presenter == presenter);
56
 - (void)testInitWithEventEmmiter_shouldInitializeDependencies {
56
 - (void)testInitWithEventEmmiter_shouldInitializeDependencies {
57
     RNNLayoutInfo *layoutInfo = [RNNLayoutInfo new];
57
     RNNLayoutInfo *layoutInfo = [RNNLayoutInfo new];
58
     RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:@{}];
58
     RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:@{}];
59
-    RNNTabBarPresenter *presenter = [[RNNTabBarPresenter alloc] init];
59
+    RNNBottomTabsPresenter *presenter = [[RNNBottomTabsPresenter alloc] init];
60
     RNNEventEmitter *eventEmmiter = [RNNEventEmitter new];
60
     RNNEventEmitter *eventEmmiter = [RNNEventEmitter new];
61
 
61
 
62
     NSArray *childViewControllers = @[[UIViewController new]];
62
     NSArray *childViewControllers = @[[UIViewController new]];
63
 
63
 
64
-    RNNTabBarController *uut = [[RNNTabBarController alloc] initWithLayoutInfo:layoutInfo creator:nil options:options defaultOptions:nil presenter:presenter eventEmitter:eventEmmiter childViewControllers:childViewControllers];
64
+    RNNBottomTabsController *uut = [[RNNBottomTabsController alloc] initWithLayoutInfo:layoutInfo creator:nil options:options defaultOptions:nil presenter:presenter eventEmitter:eventEmmiter childViewControllers:childViewControllers];
65
     XCTAssertTrue(uut.layoutInfo == layoutInfo);
65
     XCTAssertTrue(uut.layoutInfo == layoutInfo);
66
     XCTAssertTrue(uut.options == options);
66
     XCTAssertTrue(uut.options == options);
67
     XCTAssertTrue(uut.presenter == presenter);
67
     XCTAssertTrue(uut.presenter == presenter);
70
 }
70
 }
71
 
71
 
72
 - (void)testInitWithLayoutInfo_shouldSetDelegate {
72
 - (void)testInitWithLayoutInfo_shouldSetDelegate {
73
-    RNNTabBarController *uut = [[RNNTabBarController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initWithDict:@{}] defaultOptions:nil presenter:[[RNNBasePresenter alloc] init] eventEmitter:nil childViewControllers:nil];
73
+    RNNBottomTabsController *uut = [[RNNBottomTabsController alloc] initWithLayoutInfo:nil creator:nil options:[[RNNNavigationOptions alloc] initWithDict:@{}] defaultOptions:nil presenter:[[RNNBasePresenter alloc] init] eventEmitter:nil childViewControllers:nil];
74
 
74
 
75
     XCTAssertTrue(uut.delegate == uut);
75
     XCTAssertTrue(uut.delegate == uut);
76
 }
76
 }
90
 - (void)testMergeOptions_shouldInvokePresenterMergeOptions {
90
 - (void)testMergeOptions_shouldInvokePresenterMergeOptions {
91
     RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:@{}];
91
     RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:@{}];
92
 
92
 
93
-    [(RNNTabBarPresenter *) [self.mockTabBarPresenter expect] mergeOptions:options currentOptions:[self.uut options]];
93
+    [(RNNBottomTabsPresenter *) [self.mockTabBarPresenter expect] mergeOptions:options resolvedOptions:[self.uut options]];
94
     [self.uut mergeOptions:options];
94
     [self.uut mergeOptions:options];
95
     [self.mockTabBarPresenter verify];
95
     [self.mockTabBarPresenter verify];
96
 }
96
 }
97
 
97
 
98
 - (void)testMergeOptions_shouldInvokeParentMergeOptions {
98
 - (void)testMergeOptions_shouldInvokeParentMergeOptions {
99
-    id parentMock = [OCMockObject partialMockForObject:[RNNRootViewController new]];
99
+    id parentMock = [OCMockObject partialMockForObject:[RNNComponentViewController new]];
100
     RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:@{}];
100
     RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initWithDict:@{}];
101
 
101
 
102
     OCMStub([self.uut parentViewController]).andReturn(parentMock);
102
     OCMStub([self.uut parentViewController]).andReturn(parentMock);
103
-    [((RNNRootViewController *) [parentMock expect]) mergeChildOptions:options];
103
+    [((RNNComponentViewController *) [parentMock expect]) mergeChildOptions:options];
104
     [self.uut mergeOptions:options];
104
     [self.uut mergeOptions:options];
105
     [parentMock verify];
105
     [parentMock verify];
106
 }
106
 }
107
 
107
 
108
 - (void)testOnChildAppear_shouldInvokeParentOnChildAppear {
108
 - (void)testOnChildAppear_shouldInvokeParentOnChildAppear {
109
-    id parentMock = [OCMockObject partialMockForObject:[RNNNavigationController new]];
109
+    id parentMock = [OCMockObject partialMockForObject:[RNNStackController new]];
110
 
110
 
111
     OCMStub([self.uut parentViewController]).andReturn(parentMock);
111
     OCMStub([self.uut parentViewController]).andReturn(parentMock);
112
 
112
 
122
 }
122
 }
123
 
123
 
124
 - (void)testGetCurrentChild_shouldReturnSelectedViewController {
124
 - (void)testGetCurrentChild_shouldReturnSelectedViewController {
125
-    XCTAssertEqual([self.uut getCurrentChild], [(RNNTabBarController *) self.uut selectedViewController]);
125
+    XCTAssertEqual([self.uut getCurrentChild], [(RNNBottomTabsController *) self.uut selectedViewController]);
126
 }
126
 }
127
 
127
 
128
 - (void)testPreferredStatusBarStyle_shouldInvokeSelectedViewControllerPreferredStatusBarStyle {
128
 - (void)testPreferredStatusBarStyle_shouldInvokeSelectedViewControllerPreferredStatusBarStyle {
144
     RNNLayoutInfo *layoutInfo = [RNNLayoutInfo new];
144
     RNNLayoutInfo *layoutInfo = [RNNLayoutInfo new];
145
     layoutInfo.componentId = @"componentId";
145
     layoutInfo.componentId = @"componentId";
146
 
146
 
147
-    RNNRootViewController *vc = [[RNNRootViewController alloc] initWithLayoutInfo:layoutInfo rootViewCreator:nil eventEmitter:nil presenter:nil options:nil defaultOptions:nil];
147
+    RNNComponentViewController *vc = [[RNNComponentViewController alloc] initWithLayoutInfo:layoutInfo rootViewCreator:nil eventEmitter:nil presenter:nil options:nil defaultOptions:nil];
148
 
148
 
149
-    RNNTabBarController *uut = [[RNNTabBarController alloc] initWithLayoutInfo:nil creator:nil options:nil defaultOptions:nil presenter:[RNNTabBarPresenter new] eventEmitter:nil childViewControllers:@[[UIViewController new], vc]];
149
+    RNNBottomTabsController *uut = [[RNNBottomTabsController alloc] initWithLayoutInfo:nil creator:nil options:nil defaultOptions:nil presenter:[RNNBottomTabsPresenter new] eventEmitter:nil childViewControllers:@[[UIViewController new], vc]];
150
     [uut setSelectedIndexByComponentID:@"componentId"];
150
     [uut setSelectedIndexByComponentID:@"componentId"];
151
     XCTAssertTrue(uut.selectedIndex == 1);
151
     XCTAssertTrue(uut.selectedIndex == 1);
152
 }
152
 }
155
     RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initEmptyOptions];
155
     RNNNavigationOptions *options = [[RNNNavigationOptions alloc] initEmptyOptions];
156
     options.bottomTabs.currentTabIndex = [[IntNumber alloc] initWithValue:@(1)];
156
     options.bottomTabs.currentTabIndex = [[IntNumber alloc] initWithValue:@(1)];
157
 
157
 
158
-    RNNRootViewController *vc = [[RNNRootViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:nil options:nil defaultOptions:nil];
159
-    RNNTabBarController *uut = [[RNNTabBarController alloc] initWithLayoutInfo:nil creator:nil options:options defaultOptions:nil presenter:[RNNTabBarPresenter new] eventEmitter:nil childViewControllers:@[[UIViewController new], vc]];
158
+    RNNComponentViewController *vc = [[RNNComponentViewController alloc] initWithLayoutInfo:nil rootViewCreator:nil eventEmitter:nil presenter:nil options:nil defaultOptions:nil];
159
+    RNNBottomTabsController *uut = [[RNNBottomTabsController alloc] initWithLayoutInfo:nil creator:nil options:options defaultOptions:nil presenter:[RNNBottomTabsPresenter new] eventEmitter:nil childViewControllers:@[[UIViewController new], vc]];
160
 
160
 
161
     XCTAssertTrue(uut.selectedIndex == 1);
161
     XCTAssertTrue(uut.selectedIndex == 1);
162
 }
162
 }

+ 17
- 17
lib/ios/ReactNativeNavigationTests/RNNTabBarPresenterTest.m View File

1
 #import <XCTest/XCTest.h>
1
 #import <XCTest/XCTest.h>
2
 #import <OCMock/OCMock.h>
2
 #import <OCMock/OCMock.h>
3
-#import "RNNTabBarPresenter.h"
3
+#import "RNNBottomTabsPresenter.h"
4
 #import "UITabBarController+RNNOptions.h"
4
 #import "UITabBarController+RNNOptions.h"
5
-#import "RNNTabBarController.h"
5
+#import "RNNBottomTabsController.h"
6
 
6
 
7
 @interface RNNTabBarPresenterTest : XCTestCase
7
 @interface RNNTabBarPresenterTest : XCTestCase
8
 
8
 
9
-@property(nonatomic, strong) RNNTabBarPresenter *uut;
9
+@property(nonatomic, strong) RNNBottomTabsPresenter *uut;
10
 @property(nonatomic, strong) RNNNavigationOptions *options;
10
 @property(nonatomic, strong) RNNNavigationOptions *options;
11
 @property(nonatomic, strong) id boundViewController;
11
 @property(nonatomic, strong) id boundViewController;
12
 
12
 
16
 
16
 
17
 - (void)setUp {
17
 - (void)setUp {
18
     [super setUp];
18
     [super setUp];
19
-    self.uut = [OCMockObject partialMockForObject:[RNNTabBarPresenter new]];
20
-    self.boundViewController = [OCMockObject partialMockForObject:[RNNTabBarController new]];
19
+    self.uut = [OCMockObject partialMockForObject:[RNNBottomTabsPresenter new]];
20
+    self.boundViewController = [OCMockObject partialMockForObject:[RNNBottomTabsController new]];
21
     [self.uut bindViewController:self.boundViewController];
21
     [self.uut bindViewController:self.boundViewController];
22
     self.options = [[RNNNavigationOptions alloc] initEmptyOptions];
22
     self.options = [[RNNNavigationOptions alloc] initEmptyOptions];
23
 }
23
 }
24
 
24
 
25
 - (void)testApplyOptions_shouldSetDefaultEmptyOptions {
25
 - (void)testApplyOptions_shouldSetDefaultEmptyOptions {
26
     RNNNavigationOptions *emptyOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
26
     RNNNavigationOptions *emptyOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
27
-    [[self.boundViewController expect] rnn_setTabBarTestID:nil];
28
-    [[self.boundViewController expect] rnn_setTabBarBackgroundColor:nil];
29
-    [[self.boundViewController expect] rnn_setTabBarTranslucent:NO];
30
-    [[self.boundViewController expect] rnn_setTabBarHideShadow:NO];
31
-    [[self.boundViewController expect] rnn_setTabBarStyle:UIBarStyleDefault];
32
-    [[self.boundViewController expect] rnn_setTabBarVisible:YES animated:NO];
27
+    [[self.boundViewController expect] setTabBarTestID:nil];
28
+    [[self.boundViewController expect] setTabBarBackgroundColor:nil];
29
+    [[self.boundViewController expect] setTabBarTranslucent:NO];
30
+    [[self.boundViewController expect] setTabBarHideShadow:NO];
31
+    [[self.boundViewController expect] setTabBarStyle:UIBarStyleDefault];
32
+    [[self.boundViewController expect] setTabBarVisible:YES animated:NO];
33
     [self.uut applyOptions:emptyOptions];
33
     [self.uut applyOptions:emptyOptions];
34
     [self.boundViewController verify];
34
     [self.boundViewController verify];
35
 }
35
 }
43
     initialOptions.bottomTabs.visible = [[Bool alloc] initWithValue:@(0)];
43
     initialOptions.bottomTabs.visible = [[Bool alloc] initWithValue:@(0)];
44
     initialOptions.bottomTabs.barStyle = [[Text alloc] initWithValue:@"black"];
44
     initialOptions.bottomTabs.barStyle = [[Text alloc] initWithValue:@"black"];
45
 
45
 
46
-    [[self.boundViewController expect] rnn_setTabBarTestID:@"testID"];
47
-    [[self.boundViewController expect] rnn_setTabBarBackgroundColor:[UIColor redColor]];
48
-    [[self.boundViewController expect] rnn_setTabBarTranslucent:NO];
49
-    [[self.boundViewController expect] rnn_setTabBarHideShadow:YES];
50
-    [[self.boundViewController expect] rnn_setTabBarStyle:UIBarStyleBlack];
51
-    [[self.boundViewController expect] rnn_setTabBarVisible:NO animated:NO];
46
+    [[self.boundViewController expect] setTabBarTestID:@"testID"];
47
+    [[self.boundViewController expect] setTabBarBackgroundColor:[UIColor redColor]];
48
+    [[self.boundViewController expect] setTabBarTranslucent:NO];
49
+    [[self.boundViewController expect] setTabBarHideShadow:YES];
50
+    [[self.boundViewController expect] setTabBarStyle:UIBarStyleBlack];
51
+    [[self.boundViewController expect] setTabBarVisible:NO animated:NO];
52
 
52
 
53
     [self.uut applyOptions:initialOptions];
53
     [self.uut applyOptions:initialOptions];
54
     [self.boundViewController verify];
54
     [self.boundViewController verify];

+ 2
- 2
lib/ios/ReactNativeNavigationTests/RNNTestRootViewCreator.h View File

1
 #import <Foundation/Foundation.h>
1
 #import <Foundation/Foundation.h>
2
-#import "RNNRootViewCreator.h"
2
+#import "RNNComponentViewCreator.h"
3
 
3
 
4
-@interface RNNTestRootViewCreator : NSObject <RNNRootViewCreator>
4
+@interface RNNTestRootViewCreator : NSObject <RNNComponentViewCreator>
5
 
5
 
6
 @end
6
 @end

+ 52
- 52
lib/ios/ReactNativeNavigationTests/RNNViewControllerPresenterTest.m View File

1
 #import <XCTest/XCTest.h>
1
 #import <XCTest/XCTest.h>
2
 #import <OCMock/OCMock.h>
2
 #import <OCMock/OCMock.h>
3
-#import "RNNViewControllerPresenter.h"
3
+#import "RNNComponentPresenter.h"
4
 #import "UIViewController+RNNOptions.h"
4
 #import "UIViewController+RNNOptions.h"
5
-#import "RNNRootViewController.h"
5
+#import "RNNComponentViewController.h"
6
 
6
 
7
 @interface RNNViewControllerPresenterTest : XCTestCase
7
 @interface RNNViewControllerPresenterTest : XCTestCase
8
 
8
 
9
-@property (nonatomic, strong) RNNViewControllerPresenter *uut;
9
+@property (nonatomic, strong) RNNComponentPresenter *uut;
10
 @property (nonatomic, strong) RNNNavigationOptions *options;
10
 @property (nonatomic, strong) RNNNavigationOptions *options;
11
-@property (nonatomic, strong) UIViewController *bindedViewController;
11
+@property (nonatomic, strong) UIViewController *boundViewController;
12
 @property (nonatomic, strong) RNNReactComponentRegistry *componentRegistry;
12
 @property (nonatomic, strong) RNNReactComponentRegistry *componentRegistry;
13
 
13
 
14
 @end
14
 @end
18
 - (void)setUp {
18
 - (void)setUp {
19
     [super setUp];
19
     [super setUp];
20
 	self.componentRegistry = [OCMockObject partialMockForObject:[RNNReactComponentRegistry new]];
20
 	self.componentRegistry = [OCMockObject partialMockForObject:[RNNReactComponentRegistry new]];
21
-	self.uut = [[RNNViewControllerPresenter alloc] initWithComponentRegistry:self.componentRegistry:[[RNNNavigationOptions alloc] initEmptyOptions]];
22
-	self.bindedViewController = [OCMockObject partialMockForObject:[RNNRootViewController new]];
23
-	[self.uut bindViewController:self.bindedViewController];
21
+	self.uut = [[RNNComponentPresenter alloc] initWithComponentRegistry:self.componentRegistry:[[RNNNavigationOptions alloc] initEmptyOptions]];
22
+	self.boundViewController = [OCMockObject partialMockForObject:[RNNComponentViewController new]];
23
+	[self.uut bindViewController:self.boundViewController];
24
 	self.options = [[RNNNavigationOptions alloc] initEmptyOptions];
24
 	self.options = [[RNNNavigationOptions alloc] initEmptyOptions];
25
 }
25
 }
26
 
26
 
27
 - (void)testApplyOptions_backgroundImageDefaultNilShouldNotAddSubview {
27
 - (void)testApplyOptions_backgroundImageDefaultNilShouldNotAddSubview {
28
 	[self.uut applyOptions:self.options];
28
 	[self.uut applyOptions:self.options];
29
-	XCTAssertTrue((self.bindedViewController.view.subviews.count) == 0);
29
+	XCTAssertTrue((self.boundViewController.view.subviews.count) == 0);
30
 }
30
 }
31
 
31
 
32
 - (void)testApplyOptions_topBarPrefersLargeTitleDefaultFalse {
32
 - (void)testApplyOptions_topBarPrefersLargeTitleDefaultFalse {
33
 	[self.uut applyOptions:self.options];
33
 	[self.uut applyOptions:self.options];
34
 	
34
 	
35
-	XCTAssertTrue(self.bindedViewController.navigationItem.largeTitleDisplayMode == UINavigationItemLargeTitleDisplayModeNever);
35
+	XCTAssertTrue(self.boundViewController.navigationItem.largeTitleDisplayMode == UINavigationItemLargeTitleDisplayModeNever);
36
 }
36
 }
37
 
37
 
38
 - (void)testApplyOptions_layoutBackgroundColorDefaultWhiteColor {
38
 - (void)testApplyOptions_layoutBackgroundColorDefaultWhiteColor {
39
 	[self.uut applyOptions:self.options];
39
 	[self.uut applyOptions:self.options];
40
-	XCTAssertNil(self.bindedViewController.view.backgroundColor);
40
+	XCTAssertNil(self.boundViewController.view.backgroundColor);
41
 }
41
 }
42
 
42
 
43
 - (void)testApplyOptions_statusBarBlurDefaultFalse {
43
 - (void)testApplyOptions_statusBarBlurDefaultFalse {
44
 	[self.uut applyOptions:self.options];
44
 	[self.uut applyOptions:self.options];
45
-	XCTAssertNil([self.bindedViewController.view viewWithTag:BLUR_STATUS_TAG]);
45
+	XCTAssertNil([self.boundViewController.view viewWithTag:BLUR_STATUS_TAG]);
46
 }
46
 }
47
 
47
 
48
 - (void)testApplyOptions_statusBarStyleDefaultStyle {
48
 - (void)testApplyOptions_statusBarStyleDefaultStyle {
49
 	[self.uut applyOptions:self.options];
49
 	[self.uut applyOptions:self.options];
50
-	XCTAssertTrue([self.bindedViewController preferredStatusBarStyle] == UIStatusBarStyleDefault);
50
+	XCTAssertTrue([self.boundViewController preferredStatusBarStyle] == UIStatusBarStyleDefault);
51
 }
51
 }
52
 
52
 
53
 - (void)testApplyOptions_backButtonVisibleDefaultTrue {
53
 - (void)testApplyOptions_backButtonVisibleDefaultTrue {
54
 	[self.uut applyOptions:self.options];
54
 	[self.uut applyOptions:self.options];
55
-	XCTAssertFalse(self.bindedViewController.navigationItem.hidesBackButton);
55
+	XCTAssertFalse(self.boundViewController.navigationItem.hidesBackButton);
56
 }
56
 }
57
 
57
 
58
 - (void)testApplyOptions_drawBehindTabBarTrueWhenVisibleFalse {
58
 - (void)testApplyOptions_drawBehindTabBarTrueWhenVisibleFalse {
59
 	self.options.bottomTabs.visible = [[Bool alloc] initWithValue:@(0)];
59
 	self.options.bottomTabs.visible = [[Bool alloc] initWithValue:@(0)];
60
-	[[(id)self.bindedViewController expect] rnn_setDrawBehindTabBar:YES];
60
+	[[(id) self.boundViewController expect] setDrawBehindTabBar:YES];
61
 	[self.uut applyOptionsOnInit:self.options];
61
 	[self.uut applyOptionsOnInit:self.options];
62
-	[(id)self.bindedViewController verify];
62
+	[(id)self.boundViewController verify];
63
 }
63
 }
64
 
64
 
65
 - (void)testApplyOptions_setOverlayTouchOutsideIfHasValue {
65
 - (void)testApplyOptions_setOverlayTouchOutsideIfHasValue {
66
     self.options.overlay.interceptTouchOutside = [[Bool alloc] initWithBOOL:YES];
66
     self.options.overlay.interceptTouchOutside = [[Bool alloc] initWithBOOL:YES];
67
-    [[(id)self.bindedViewController expect] rnn_setInterceptTouchOutside:YES];
67
+    [(UIViewController *) [(id) self.boundViewController expect] setInterceptTouchOutside:YES];
68
     [self.uut applyOptions:self.options];
68
     [self.uut applyOptions:self.options];
69
-    [(id)self.bindedViewController verify];
69
+    [(id)self.boundViewController verify];
70
 }
70
 }
71
 
71
 
72
 - (void)testBindViewControllerShouldCreateNavigationButtonsCreator {
72
 - (void)testBindViewControllerShouldCreateNavigationButtonsCreator {
73
-	RNNViewControllerPresenter* presenter = [[RNNViewControllerPresenter alloc] init];
74
-	[presenter bindViewController:self.bindedViewController];
73
+	RNNComponentPresenter* presenter = [[RNNComponentPresenter alloc] init];
74
+	[presenter bindViewController:self.boundViewController];
75
 	XCTAssertNotNil(presenter.navigationButtons);
75
 	XCTAssertNotNil(presenter.navigationButtons);
76
 }
76
 }
77
 
77
 
78
-- (void)testApplyOptionsOnInit_shouldSetModalPresentetionStyleWithDefault {
79
-	[[(id)self.bindedViewController expect] rnn_setModalPresentationStyle:UIModalPresentationFullScreen];
78
+- (void)testApplyOptionsOnInit_shouldSetModalPresentationStyleWithDefault {
79
+    [(UIViewController *) [(id) self.boundViewController expect] setModalPresentationStyle:UIModalPresentationFullScreen];
80
 	[self.uut applyOptionsOnInit:self.options];
80
 	[self.uut applyOptionsOnInit:self.options];
81
-	[(id)self.bindedViewController verify];
81
+	[(id)self.boundViewController verify];
82
 }
82
 }
83
 
83
 
84
 - (void)testApplyOptionsOnInit_shouldSetModalTransitionStyleWithDefault {
84
 - (void)testApplyOptionsOnInit_shouldSetModalTransitionStyleWithDefault {
85
-	[[(id)self.bindedViewController expect] rnn_setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
85
+	[(UIViewController *) [(id) self.boundViewController expect] setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
86
 	[self.uut applyOptionsOnInit:self.options];
86
 	[self.uut applyOptionsOnInit:self.options];
87
-	[(id)self.bindedViewController verify];
87
+	[(id)self.boundViewController verify];
88
 }
88
 }
89
 
89
 
90
-- (void)testApplyOptionsOnInit_shouldSetModalPresentetionStyleWithValue {
90
+- (void)testApplyOptionsOnInit_shouldSetModalPresentationStyleWithValue {
91
 	self.options.modalPresentationStyle = [[Text alloc] initWithValue:@"overCurrentContext"];
91
 	self.options.modalPresentationStyle = [[Text alloc] initWithValue:@"overCurrentContext"];
92
-	[[(id)self.bindedViewController expect] rnn_setModalPresentationStyle:UIModalPresentationOverCurrentContext];
92
+    [(UIViewController *) [(id) self.boundViewController expect] setModalPresentationStyle:UIModalPresentationOverCurrentContext];
93
 	[self.uut applyOptionsOnInit:self.options];
93
 	[self.uut applyOptionsOnInit:self.options];
94
-	[(id)self.bindedViewController verify];
94
+	[(id)self.boundViewController verify];
95
 }
95
 }
96
 
96
 
97
 - (void)testApplyOptionsOnInit_shouldSetModalTransitionStyleWithValue {
97
 - (void)testApplyOptionsOnInit_shouldSetModalTransitionStyleWithValue {
98
 	self.options.modalTransitionStyle = [[Text alloc] initWithValue:@"crossDissolve"];
98
 	self.options.modalTransitionStyle = [[Text alloc] initWithValue:@"crossDissolve"];
99
-	[[(id)self.bindedViewController expect] rnn_setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
99
+	[(UIViewController *) [(id) self.boundViewController expect] setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
100
 	[self.uut applyOptionsOnInit:self.options];
100
 	[self.uut applyOptionsOnInit:self.options];
101
-	[(id)self.bindedViewController verify];
101
+	[(id)self.boundViewController verify];
102
 }
102
 }
103
 
103
 
104
 -(void)testApplyOptionsOnInit_TopBarDrawUnder_true {
104
 -(void)testApplyOptionsOnInit_TopBarDrawUnder_true {
105
     self.options.topBar.drawBehind = [[Bool alloc] initWithValue:@(1)];
105
     self.options.topBar.drawBehind = [[Bool alloc] initWithValue:@(1)];
106
-    
107
-    [[(id)self.bindedViewController expect] rnn_setDrawBehindTopBar:YES];
106
+
107
+	[[(id) self.boundViewController expect] setDrawBehindTopBar:YES];
108
     [self.uut applyOptionsOnInit:self.options];
108
     [self.uut applyOptionsOnInit:self.options];
109
-    [(id)self.bindedViewController verify];
109
+    [(id)self.boundViewController verify];
110
 }
110
 }
111
 
111
 
112
 -(void)testApplyOptionsOnInit_TopBarDrawUnder_false {
112
 -(void)testApplyOptionsOnInit_TopBarDrawUnder_false {
113
     self.options.topBar.drawBehind = [[Bool alloc] initWithValue:@(0)];
113
     self.options.topBar.drawBehind = [[Bool alloc] initWithValue:@(0)];
114
-    
115
-    [[(id)self.bindedViewController expect] rnn_setDrawBehindTopBar:NO];
114
+
115
+	[[(id) self.boundViewController expect] setDrawBehindTopBar:NO];
116
     [self.uut applyOptionsOnInit:self.options];
116
     [self.uut applyOptionsOnInit:self.options];
117
-    [(id)self.bindedViewController verify];
117
+    [(id)self.boundViewController verify];
118
 }
118
 }
119
 
119
 
120
 -(void)testApplyOptionsOnInit_BottomTabsDrawUnder_true {
120
 -(void)testApplyOptionsOnInit_BottomTabsDrawUnder_true {
121
     self.options.bottomTabs.drawBehind = [[Bool alloc] initWithValue:@(1)];
121
     self.options.bottomTabs.drawBehind = [[Bool alloc] initWithValue:@(1)];
122
-    
123
-    [[(id)self.bindedViewController expect] rnn_setDrawBehindTabBar:YES];
122
+
123
+	[[(id) self.boundViewController expect] setDrawBehindTabBar:YES];
124
     [self.uut applyOptionsOnInit:self.options];
124
     [self.uut applyOptionsOnInit:self.options];
125
-    [(id)self.bindedViewController verify];
125
+    [(id)self.boundViewController verify];
126
 }
126
 }
127
 
127
 
128
 -(void)testApplyOptionsOnInit_BottomTabsDrawUnder_false {
128
 -(void)testApplyOptionsOnInit_BottomTabsDrawUnder_false {
129
     self.options.bottomTabs.drawBehind = [[Bool alloc] initWithValue:@(0)];
129
     self.options.bottomTabs.drawBehind = [[Bool alloc] initWithValue:@(0)];
130
-    
131
-    [[(id)self.bindedViewController expect] rnn_setDrawBehindTabBar:NO];
130
+
131
+	[[(id) self.boundViewController expect] setDrawBehindTabBar:NO];
132
     [self.uut applyOptionsOnInit:self.options];
132
     [self.uut applyOptionsOnInit:self.options];
133
-    [(id)self.bindedViewController verify];
133
+    [(id)self.boundViewController verify];
134
 }
134
 }
135
 
135
 
136
 - (void)testReactViewShouldBeReleasedOnDealloc {
136
 - (void)testReactViewShouldBeReleasedOnDealloc {
137
-	RNNRootViewController* bindViewController = [RNNRootViewController new];
137
+	RNNComponentViewController* bindViewController = [RNNComponentViewController new];
138
 	bindViewController.layoutInfo = [self createLayoutInfoWithComponentId:@"componentId"];
138
 	bindViewController.layoutInfo = [self createLayoutInfoWithComponentId:@"componentId"];
139
 	[self.uut bindViewController:bindViewController];
139
 	[self.uut bindViewController:bindViewController];
140
 	
140
 	
146
 }
146
 }
147
 
147
 
148
 - (void)testBindViewControllerShouldSetBindedComponentId {
148
 - (void)testBindViewControllerShouldSetBindedComponentId {
149
-	RNNRootViewController* bindViewController = [RNNRootViewController new];
149
+	RNNComponentViewController* bindViewController = [RNNComponentViewController new];
150
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] init];
150
 	RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] init];
151
 	layoutInfo.componentId = @"componentId";
151
 	layoutInfo.componentId = @"componentId";
152
 	bindViewController.layoutInfo = layoutInfo;
152
 	bindViewController.layoutInfo = layoutInfo;
156
 }
156
 }
157
 
157
 
158
 - (void)testRenderComponentsCreateReactViewWithBindedComponentId {
158
 - (void)testRenderComponentsCreateReactViewWithBindedComponentId {
159
-	RNNRootViewController* bindedViewController = [RNNRootViewController new];
159
+	RNNComponentViewController* bindedViewController = [RNNComponentViewController new];
160
 	RNNLayoutInfo* layoutInfo = [self createLayoutInfoWithComponentId:@"componentId"];
160
 	RNNLayoutInfo* layoutInfo = [self createLayoutInfoWithComponentId:@"componentId"];
161
 	bindedViewController.layoutInfo = layoutInfo;
161
 	bindedViewController.layoutInfo = layoutInfo;
162
 	
162
 	
175
 - (void)testApplyOptionsOnWillMoveToParent_shouldSetBackButtonOnBindedViewController_withTitle {
175
 - (void)testApplyOptionsOnWillMoveToParent_shouldSetBackButtonOnBindedViewController_withTitle {
176
 	Text* title = [[Text alloc] initWithValue:@"Title"];
176
 	Text* title = [[Text alloc] initWithValue:@"Title"];
177
 	self.options.topBar.backButton.title = title;
177
 	self.options.topBar.backButton.title = title;
178
-	[[(id)self.bindedViewController expect] rnn_setBackButtonIcon:nil withColor:nil title:title.get];
178
+	[[(id) self.boundViewController expect] setBackButtonIcon:nil withColor:nil title:title.get];
179
 	[self.uut applyOptionsOnWillMoveToParentViewController:self.options];
179
 	[self.uut applyOptionsOnWillMoveToParentViewController:self.options];
180
-	[(id)self.bindedViewController verify];
180
+	[(id)self.boundViewController verify];
181
 }
181
 }
182
 
182
 
183
 - (void)testApplyOptionsOnWillMoveToParent_shouldSetBackButtonOnBindedViewController_withHideTitle {
183
 - (void)testApplyOptionsOnWillMoveToParent_shouldSetBackButtonOnBindedViewController_withHideTitle {
184
 	Text* title = [[Text alloc] initWithValue:@"Title"];
184
 	Text* title = [[Text alloc] initWithValue:@"Title"];
185
 	self.options.topBar.backButton.title = title;
185
 	self.options.topBar.backButton.title = title;
186
 	self.options.topBar.backButton.showTitle = [[Bool alloc] initWithValue:@(0)];
186
 	self.options.topBar.backButton.showTitle = [[Bool alloc] initWithValue:@(0)];
187
-	[[(id)self.bindedViewController expect] rnn_setBackButtonIcon:nil withColor:nil title:@""];
187
+	[[(id) self.boundViewController expect] setBackButtonIcon:nil withColor:nil title:@""];
188
 	[self.uut applyOptionsOnWillMoveToParentViewController:self.options];
188
 	[self.uut applyOptionsOnWillMoveToParentViewController:self.options];
189
-	[(id)self.bindedViewController verify];
189
+	[(id)self.boundViewController verify];
190
 }
190
 }
191
 
191
 
192
 - (void)testApplyOptionsOnWillMoveToParent_shouldSetBackButtonOnBindedViewController_withIcon {
192
 - (void)testApplyOptionsOnWillMoveToParent_shouldSetBackButtonOnBindedViewController_withIcon {
193
 	Image* image = [[Image alloc] initWithValue:[UIImage new]];
193
 	Image* image = [[Image alloc] initWithValue:[UIImage new]];
194
 	self.options.topBar.backButton.icon = image;
194
 	self.options.topBar.backButton.icon = image;
195
-	[[(id)self.bindedViewController expect] rnn_setBackButtonIcon:image.get withColor:nil title:nil];
195
+	[[(id) self.boundViewController expect] setBackButtonIcon:image.get withColor:nil title:nil];
196
 	[self.uut applyOptionsOnWillMoveToParentViewController:self.options];
196
 	[self.uut applyOptionsOnWillMoveToParentViewController:self.options];
197
-	[(id)self.bindedViewController verify];
197
+	[(id)self.boundViewController verify];
198
 }
198
 }
199
 
199
 
200
 - (void)testApplyOptionsOnWillMoveToParent_shouldSetBackButtonOnBindedViewController_withDefaultValues {
200
 - (void)testApplyOptionsOnWillMoveToParent_shouldSetBackButtonOnBindedViewController_withDefaultValues {
201
-	[[(id)self.bindedViewController expect] rnn_setBackButtonIcon:nil withColor:nil title:nil];
201
+	[[(id) self.boundViewController expect] setBackButtonIcon:nil withColor:nil title:nil];
202
 	[self.uut applyOptionsOnWillMoveToParentViewController:self.options];
202
 	[self.uut applyOptionsOnWillMoveToParentViewController:self.options];
203
-	[(id)self.bindedViewController verify];
203
+	[(id)self.boundViewController verify];
204
 }
204
 }
205
 
205
 
206
 
206
 

+ 5
- 5
lib/ios/ReactNativeNavigationTests/UITabBarController+RNNOptionsTest.m View File

16
 }
16
 }
17
 
17
 
18
 - (void)test_tabBarTranslucent_true {
18
 - (void)test_tabBarTranslucent_true {
19
-	[self.uut rnn_setTabBarTranslucent:YES];
19
+	[self.uut setTabBarTranslucent:YES];
20
 	XCTAssertTrue(self.uut.tabBar.translucent);
20
 	XCTAssertTrue(self.uut.tabBar.translucent);
21
 }
21
 }
22
 
22
 
23
 - (void)test_tabBarTranslucent_false {
23
 - (void)test_tabBarTranslucent_false {
24
-	[self.uut rnn_setTabBarTranslucent:NO];
24
+	[self.uut setTabBarTranslucent:NO];
25
 	XCTAssertFalse(self.uut.tabBar.translucent);
25
 	XCTAssertFalse(self.uut.tabBar.translucent);
26
 }
26
 }
27
 
27
 
30
 }
30
 }
31
 
31
 
32
 - (void)test_tabBarHideShadow_true {
32
 - (void)test_tabBarHideShadow_true {
33
-	[self.uut rnn_setTabBarHideShadow:YES];
33
+	[self.uut setTabBarHideShadow:YES];
34
 	XCTAssertTrue(self.uut.tabBar.clipsToBounds);
34
 	XCTAssertTrue(self.uut.tabBar.clipsToBounds);
35
 }
35
 }
36
 
36
 
37
 - (void)test_tabBarHideShadow_false {
37
 - (void)test_tabBarHideShadow_false {
38
-	[self.uut rnn_setTabBarHideShadow:NO];
38
+	[self.uut setTabBarHideShadow:NO];
39
 	XCTAssertFalse(self.uut.tabBar.clipsToBounds);
39
 	XCTAssertFalse(self.uut.tabBar.clipsToBounds);
40
 }
40
 }
41
 
41
 
42
 - (void)test_tabBarBackgroundColor {
42
 - (void)test_tabBarBackgroundColor {
43
 	UIColor* tabBarBackgroundColor = [UIColor redColor];
43
 	UIColor* tabBarBackgroundColor = [UIColor redColor];
44
 
44
 
45
-	[self.uut rnn_setTabBarBackgroundColor:tabBarBackgroundColor];
45
+	[self.uut setTabBarBackgroundColor:tabBarBackgroundColor];
46
 	XCTAssertTrue([self.uut.tabBar.barTintColor isEqual:tabBarBackgroundColor]);
46
 	XCTAssertTrue([self.uut.tabBar.barTintColor isEqual:tabBarBackgroundColor]);
47
 }
47
 }
48
 
48
 

+ 21
- 21
lib/ios/ReactNativeNavigationTests/UIViewController+LayoutProtocolTest.m View File

2
 #import <OCMock/OCMock.h>
2
 #import <OCMock/OCMock.h>
3
 #import "UIViewController+LayoutProtocol.h"
3
 #import "UIViewController+LayoutProtocol.h"
4
 #import "UIViewController+RNNOptions.h"
4
 #import "UIViewController+RNNOptions.h"
5
-#import "RNNViewControllerPresenter.h"
5
+#import "RNNComponentPresenter.h"
6
 #import "RCTConvert+Modal.h"
6
 #import "RCTConvert+Modal.h"
7
-#import "RNNTabBarController.h"
8
-#import "RNNNavigationController.h"
7
+#import "RNNBottomTabsController.h"
8
+#import "RNNStackController.h"
9
 
9
 
10
 @interface UIViewController_LayoutProtocolTest : XCTestCase
10
 @interface UIViewController_LayoutProtocolTest : XCTestCase
11
 
11
 
23
 }
23
 }
24
 
24
 
25
 - (void)testInitWithLayoutApplyDefaultOptions {
25
 - (void)testInitWithLayoutApplyDefaultOptions {
26
-    RNNViewControllerPresenter* presenter = [[RNNViewControllerPresenter alloc] init];
26
+    RNNComponentPresenter* presenter = [[RNNComponentPresenter alloc] init];
27
     RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initEmptyOptions];
27
     RNNNavigationOptions* options = [[RNNNavigationOptions alloc] initEmptyOptions];
28
     RNNNavigationOptions* defaultOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
28
     RNNNavigationOptions* defaultOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
29
     defaultOptions.modalPresentationStyle = [[Text alloc] initWithValue:@"fullScreen"];
29
     defaultOptions.modalPresentationStyle = [[Text alloc] initWithValue:@"fullScreen"];
46
 	UIViewController* uut = [UIViewController new];
46
 	UIViewController* uut = [UIViewController new];
47
 	[[UINavigationController alloc] initWithRootViewController:uut];
47
 	[[UINavigationController alloc] initWithRootViewController:uut];
48
 	UIColor* color = [UIColor blackColor];
48
 	UIColor* color = [UIColor blackColor];
49
-	
50
-	[uut rnn_setBackButtonIcon:nil withColor:color title:nil];
49
+
50
+    [uut setBackButtonIcon:nil withColor:color title:nil];
51
 	XCTAssertEqual(color, uut.navigationItem.backBarButtonItem.tintColor);
51
 	XCTAssertEqual(color, uut.navigationItem.backBarButtonItem.tintColor);
52
 }
52
 }
53
 
53
 
55
 	UIViewController* uut = [UIViewController new];
55
 	UIViewController* uut = [UIViewController new];
56
     UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:uut];
56
     UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:uut];
57
     NSString* title = @"Title";
57
     NSString* title = @"Title";
58
-	
59
-	[uut rnn_setBackButtonIcon:nil withColor:nil title:title];
58
+
59
+    [uut setBackButtonIcon:nil withColor:nil title:title];
60
 	XCTAssertEqual(title, uut.navigationItem.backBarButtonItem.title);
60
 	XCTAssertEqual(title, uut.navigationItem.backBarButtonItem.title);
61
 }
61
 }
62
 
62
 
64
 	UIViewController* uut = [UIViewController new];
64
 	UIViewController* uut = [UIViewController new];
65
     UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:uut];
65
     UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:uut];
66
     UIImage* icon = [UIImage new];
66
     UIImage* icon = [UIImage new];
67
-	
68
-	[uut rnn_setBackButtonIcon:icon withColor:nil title:nil];
67
+
68
+    [uut setBackButtonIcon:icon withColor:nil title:nil];
69
 	XCTAssertEqual(icon, uut.navigationItem.backBarButtonItem.image);
69
 	XCTAssertEqual(icon, uut.navigationItem.backBarButtonItem.image);
70
 }
70
 }
71
 
71
 
75
 	UINavigationController* nav = [[UINavigationController alloc] init];
75
 	UINavigationController* nav = [[UINavigationController alloc] init];
76
 	[nav setViewControllers:@[uut, viewController2]];
76
 	[nav setViewControllers:@[uut, viewController2]];
77
 	NSString* title = @"Title";
77
 	NSString* title = @"Title";
78
-	
79
-	[uut rnn_setBackButtonIcon:nil withColor:nil title:title];
78
+
79
+    [uut setBackButtonIcon:nil withColor:nil title:title];
80
 	XCTAssertEqual(title, uut.navigationItem.backBarButtonItem.title);
80
 	XCTAssertEqual(title, uut.navigationItem.backBarButtonItem.title);
81
 }
81
 }
82
 
82
 
83
 - (void)testResolveOptions {
83
 - (void)testResolveOptions {
84
-	RNNViewControllerPresenter* presenter = [[RNNViewControllerPresenter alloc] init];
84
+	RNNComponentPresenter* presenter = [[RNNComponentPresenter alloc] init];
85
 
85
 
86
 	RNNNavigationOptions* childOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
86
 	RNNNavigationOptions* childOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
87
 	RNNNavigationOptions* parentOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
87
 	RNNNavigationOptions* parentOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
92
 		defaultOptions.bottomTab.selectedIconColor = [[Color alloc] initWithValue:UIColor.blueColor];
92
 		defaultOptions.bottomTab.selectedIconColor = [[Color alloc] initWithValue:UIColor.blueColor];
93
 
93
 
94
 	UIViewController* child = [[UIViewController alloc] initWithLayoutInfo:nil creator:nil options:childOptions defaultOptions:defaultOptions presenter:presenter eventEmitter:nil childViewControllers:nil];
94
 	UIViewController* child = [[UIViewController alloc] initWithLayoutInfo:nil creator:nil options:childOptions defaultOptions:defaultOptions presenter:presenter eventEmitter:nil childViewControllers:nil];
95
-    RNNNavigationController* parent = [[RNNNavigationController alloc] initWithLayoutInfo:nil creator:nil options:parentOptions defaultOptions:defaultOptions presenter:presenter eventEmitter:nil childViewControllers:@[child]];
95
+    RNNStackController* parent = [[RNNStackController alloc] initWithLayoutInfo:nil creator:nil options:parentOptions defaultOptions:defaultOptions presenter:presenter eventEmitter:nil childViewControllers:@[child]];
96
 
96
 
97
     XCTAssertEqual([parent getCurrentChild], child);
97
     XCTAssertEqual([parent getCurrentChild], child);
98
 	XCTAssertEqual([[parent resolveOptions].bottomTab.text get], @"text");
98
 	XCTAssertEqual([[parent resolveOptions].bottomTab.text get], @"text");
100
 }
100
 }
101
 
101
 
102
 - (void)testMergeOptions_invokedOnParentViewController {
102
 - (void)testMergeOptions_invokedOnParentViewController {
103
-    id parent = [OCMockObject partialMockForObject:[RNNNavigationController new]];
103
+    id parent = [OCMockObject partialMockForObject:[RNNStackController new]];
104
     RNNNavigationOptions * toMerge = [[RNNNavigationOptions alloc] initEmptyOptions];
104
     RNNNavigationOptions * toMerge = [[RNNNavigationOptions alloc] initEmptyOptions];
105
     [(UIViewController *) [parent expect] mergeChildOptions:toMerge];
105
     [(UIViewController *) [parent expect] mergeChildOptions:toMerge];
106
 
106
 
107
-    RNNNavigationController* uut = [[RNNNavigationController alloc] initWithLayoutInfo:nil creator:nil options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewControllers:nil];
107
+    RNNStackController* uut = [[RNNStackController alloc] initWithLayoutInfo:nil creator:nil options:nil defaultOptions:nil presenter:nil eventEmitter:nil childViewControllers:nil];
108
     [parent addChildViewController:uut];
108
     [parent addChildViewController:uut];
109
 
109
 
110
     [uut mergeOptions:toMerge];
110
     [uut mergeOptions:toMerge];
112
 }
112
 }
113
 
113
 
114
 - (void)testMergeOptions_presenterIsInvokedWithResolvedOptions {
114
 - (void)testMergeOptions_presenterIsInvokedWithResolvedOptions {
115
-    id parent = [OCMockObject partialMockForObject:[RNNNavigationController new]];
116
-    id presenter = [OCMockObject partialMockForObject:[RNNNavigationControllerPresenter new]];
115
+    id parent = [OCMockObject partialMockForObject:[RNNStackController new]];
116
+    id presenter = [OCMockObject partialMockForObject:[RNNStackPresenter new]];
117
     RNNNavigationOptions * toMerge = [[RNNNavigationOptions alloc] initEmptyOptions];
117
     RNNNavigationOptions * toMerge = [[RNNNavigationOptions alloc] initEmptyOptions];
118
     toMerge.topBar.title.color = [[Color alloc] initWithValue:[UIColor redColor]];
118
     toMerge.topBar.title.color = [[Color alloc] initWithValue:[UIColor redColor]];
119
 
119
 
120
-    [[presenter expect] mergeOptions:toMerge currentOptions:[OCMArg checkWithBlock:^(id value) {
121
-        RNNNavigationOptions * options = (RNNNavigationOptions *) value;
120
+    [[presenter expect] mergeOptions:toMerge resolvedOptions:[OCMArg checkWithBlock:^(id value) {
121
+        RNNNavigationOptions *options = (RNNNavigationOptions *) value;
122
         XCTAssertEqual([options.topBar.title.text get], @"Initial title");
122
         XCTAssertEqual([options.topBar.title.text get], @"Initial title");
123
         XCTAssertEqual([options.bottomTab.text get], @"Child tab text");
123
         XCTAssertEqual([options.bottomTab.text get], @"Child tab text");
124
         return YES;
124
         return YES;
129
     UIViewController* child = [[UIViewController alloc] initWithLayoutInfo:nil creator:nil options:childOptions defaultOptions:nil presenter:presenter eventEmitter:nil childViewControllers:nil];
129
     UIViewController* child = [[UIViewController alloc] initWithLayoutInfo:nil creator:nil options:childOptions defaultOptions:nil presenter:presenter eventEmitter:nil childViewControllers:nil];
130
     RNNNavigationOptions * initialOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
130
     RNNNavigationOptions * initialOptions = [[RNNNavigationOptions alloc] initEmptyOptions];
131
     initialOptions.topBar.title.text = [[Text alloc] initWithValue:@"Initial title"];
131
     initialOptions.topBar.title.text = [[Text alloc] initWithValue:@"Initial title"];
132
-    RNNNavigationController* uut = [[RNNNavigationController alloc] initWithLayoutInfo:nil creator:nil options:initialOptions defaultOptions:nil presenter:presenter eventEmitter:nil childViewControllers:@[child]];
132
+    RNNStackController* uut = [[RNNStackController alloc] initWithLayoutInfo:nil creator:nil options:initialOptions defaultOptions:nil presenter:presenter eventEmitter:nil childViewControllers:@[child]];
133
     [parent addChildViewController:uut];
133
     [parent addChildViewController:uut];
134
 
134
 
135
 	[uut mergeOptions:toMerge];
135
 	[uut mergeOptions:toMerge];

+ 14
- 14
lib/ios/ReactNativeNavigationTests/UIViewController+RNNOptionsTest.m View File

17
 }
17
 }
18
 
18
 
19
 - (void)test_setTabBarItemBadge_shouldSetValidValue {
19
 - (void)test_setTabBarItemBadge_shouldSetValidValue {
20
-    [self.uut rnn_setTabBarItemBadge:@"badge"];
20
+    [self.uut setTabBarItemBadge:@"badge"];
21
     XCTAssertEqual([self.uut tabBarItem].badgeValue, @"badge");
21
     XCTAssertEqual([self.uut tabBarItem].badgeValue, @"badge");
22
 }
22
 }
23
 
23
 
24
 - (void)test_setTabBarItemBadge_shouldResetWhenValueIsEmptyString {
24
 - (void)test_setTabBarItemBadge_shouldResetWhenValueIsEmptyString {
25
-    [self.uut rnn_setTabBarItemBadge:@"badge"];
25
+    [self.uut setTabBarItemBadge:@"badge"];
26
 
26
 
27
-    [self.uut rnn_setTabBarItemBadge:@""];
27
+    [self.uut setTabBarItemBadge:@""];
28
     XCTAssertEqual([self.uut tabBarItem].badgeValue, nil);
28
     XCTAssertEqual([self.uut tabBarItem].badgeValue, nil);
29
 }
29
 }
30
 
30
 
31
 - (void)test_setTabBarItemBadge_shouldResetWhenValueIsNullObject {
31
 - (void)test_setTabBarItemBadge_shouldResetWhenValueIsNullObject {
32
-    [self.uut rnn_setTabBarItemBadge:@"badge"];
33
-    [self.uut rnn_setTabBarItemBadge:(id) [NSNull new]];
32
+    [self.uut setTabBarItemBadge:@"badge"];
33
+    [self.uut setTabBarItemBadge:(id) [NSNull new]];
34
     XCTAssertEqual([self.uut tabBarItem].badgeValue, nil);
34
     XCTAssertEqual([self.uut tabBarItem].badgeValue, nil);
35
 }
35
 }
36
 
36
 
37
 - (void)testSetDrawBehindTopBarTrue_shouldSetExtendedLayoutTrue {
37
 - (void)testSetDrawBehindTopBarTrue_shouldSetExtendedLayoutTrue {
38
     [[self.uut expect] setExtendedLayoutIncludesOpaqueBars:YES];
38
     [[self.uut expect] setExtendedLayoutIncludesOpaqueBars:YES];
39
-    [self.uut rnn_setDrawBehindTopBar:YES];
39
+    [self.uut setDrawBehindTopBar:YES];
40
     [self.uut verify];
40
     [self.uut verify];
41
 }
41
 }
42
 
42
 
43
 - (void)testSetDrawBehindTabBarTrue_shouldSetExtendedLayoutTrue {
43
 - (void)testSetDrawBehindTabBarTrue_shouldSetExtendedLayoutTrue {
44
     [[self.uut expect] setExtendedLayoutIncludesOpaqueBars:YES];
44
     [[self.uut expect] setExtendedLayoutIncludesOpaqueBars:YES];
45
-    [self.uut rnn_setDrawBehindTabBar:YES];
45
+    [self.uut setDrawBehindTabBar:YES];
46
     [self.uut verify];
46
     [self.uut verify];
47
 }
47
 }
48
 
48
 
49
 - (void)testSetDrawBehindTopBarFalse_shouldNotCallExtendedLayout {
49
 - (void)testSetDrawBehindTopBarFalse_shouldNotCallExtendedLayout {
50
     [[self.uut reject] setExtendedLayoutIncludesOpaqueBars:NO];
50
     [[self.uut reject] setExtendedLayoutIncludesOpaqueBars:NO];
51
-    [self.uut rnn_setDrawBehindTopBar:NO];
51
+    [self.uut setDrawBehindTopBar:NO];
52
     [self.uut verify];
52
     [self.uut verify];
53
 }
53
 }
54
 
54
 
55
 - (void)testSetDrawBehindTabBarFalse_shouldNotCallExtendedLayout {
55
 - (void)testSetDrawBehindTabBarFalse_shouldNotCallExtendedLayout {
56
     [[self.uut reject] setExtendedLayoutIncludesOpaqueBars:NO];
56
     [[self.uut reject] setExtendedLayoutIncludesOpaqueBars:NO];
57
-    [self.uut rnn_setDrawBehindTabBar:NO];
57
+    [self.uut setDrawBehindTabBar:NO];
58
     [self.uut verify];
58
     [self.uut verify];
59
 }
59
 }
60
 
60
 
61
 - (void)testSetDrawBehindTopBarFalse_shouldSetCorrectEdgesForExtendedLayout {
61
 - (void)testSetDrawBehindTopBarFalse_shouldSetCorrectEdgesForExtendedLayout {
62
-    [self.uut rnn_setDrawBehindTopBar:NO];
62
+    [self.uut setDrawBehindTopBar:NO];
63
     UIRectEdge expectedRectEdge = UIRectEdgeLeft | UIRectEdgeBottom | UIRectEdgeRight;
63
     UIRectEdge expectedRectEdge = UIRectEdgeLeft | UIRectEdgeBottom | UIRectEdgeRight;
64
     XCTAssertEqual([self.uut edgesForExtendedLayout], expectedRectEdge);
64
     XCTAssertEqual([self.uut edgesForExtendedLayout], expectedRectEdge);
65
 }
65
 }
66
 
66
 
67
 - (void)testSetDrawBehindTapBarFalse_shouldSetCorrectEdgesForExtendedLayout {
67
 - (void)testSetDrawBehindTapBarFalse_shouldSetCorrectEdgesForExtendedLayout {
68
-    [self.uut rnn_setDrawBehindTabBar:NO];
68
+    [self.uut setDrawBehindTabBar:NO];
69
     UIRectEdge expectedRectEdge = UIRectEdgeTop | UIRectEdgeLeft | UIRectEdgeRight;
69
     UIRectEdge expectedRectEdge = UIRectEdgeTop | UIRectEdgeLeft | UIRectEdgeRight;
70
     XCTAssertEqual([self.uut edgesForExtendedLayout], expectedRectEdge);
70
     XCTAssertEqual([self.uut edgesForExtendedLayout], expectedRectEdge);
71
 }
71
 }
72
 
72
 
73
 - (void)testSetBackgroundImageShouldNotAddViewIfImageNil {
73
 - (void)testSetBackgroundImageShouldNotAddViewIfImageNil {
74
     NSUInteger subviewsCount = [[[self.uut view] subviews] count];
74
     NSUInteger subviewsCount = [[[self.uut view] subviews] count];
75
-    [self.uut rnn_setBackgroundImage:nil];
75
+    [self.uut setBackgroundImage:nil];
76
     XCTAssertEqual([[[self.uut view] subviews] count], subviewsCount);
76
     XCTAssertEqual([[[self.uut view] subviews] count], subviewsCount);
77
 }
77
 }
78
 
78
 
79
 - (void)testSetBackgroundImageShouldAddUIImageViewSubview {
79
 - (void)testSetBackgroundImageShouldAddUIImageViewSubview {
80
     NSUInteger subviewsCount = [[[self.uut view] subviews] count];
80
     NSUInteger subviewsCount = [[[self.uut view] subviews] count];
81
-    [self.uut rnn_setBackgroundImage:[UIImage new]];
81
+    [self.uut setBackgroundImage:[UIImage new]];
82
     XCTAssertEqual([[[self.uut view] subviews] count], subviewsCount + 1);
82
     XCTAssertEqual([[[self.uut view] subviews] count], subviewsCount + 1);
83
 }
83
 }
84
 
84
 
85
 - (void)testSetBackgroundImageShouldAddUIImageViewSubviewWithImage {
85
 - (void)testSetBackgroundImageShouldAddUIImageViewSubviewWithImage {
86
     UIImage *image = [UIImage new];
86
     UIImage *image = [UIImage new];
87
-    [self.uut rnn_setBackgroundImage:image];
87
+    [self.uut setBackgroundImage:image];
88
     UIImageView *imageView = [[[self.uut view] subviews] firstObject];
88
     UIImageView *imageView = [[[self.uut view] subviews] firstObject];
89
     XCTAssertEqual(imageView.image, image);
89
     XCTAssertEqual(imageView.image, image);
90
 }
90
 }

+ 14
- 14
lib/ios/UINavigationController+RNNOptions.h View File

2
 
2
 
3
 @interface UINavigationController (RNNOptions)
3
 @interface UINavigationController (RNNOptions)
4
 
4
 
5
-- (void)rnn_setInteractivePopGestureEnabled:(BOOL)enabled;
5
+- (void)setInteractivePopGestureEnabled:(BOOL)enabled;
6
 
6
 
7
-- (void)rnn_setRootBackgroundImage:(UIImage *)backgroundImage;
7
+- (void)setRootBackgroundImage:(UIImage *)backgroundImage;
8
 
8
 
9
-- (void)rnn_setNavigationBarTestID:(NSString *)testID;
9
+- (void)setNavigationBarTestId:(NSString *)testID;
10
 
10
 
11
-- (void)rnn_setNavigationBarVisible:(BOOL)visible animated:(BOOL)animated;
11
+- (void)setNavigationBarVisible:(BOOL)visible animated:(BOOL)animated;
12
 
12
 
13
-- (void)rnn_hideBarsOnScroll:(BOOL)hideOnScroll;
13
+- (void)hideBarsOnScroll:(BOOL)hideOnScroll;
14
 
14
 
15
-- (void)rnn_setNavigationBarNoBorder:(BOOL)noBorder;
15
+- (void)setNavigationBarNoBorder:(BOOL)noBorder;
16
 
16
 
17
-- (void)rnn_setBarStyle:(UIBarStyle)barStyle;
17
+- (void)setBarStyle:(UIBarStyle)barStyle;
18
 
18
 
19
-- (void)rnn_setNavigationBarFontFamily:(NSString *)fontFamily fontSize:(NSNumber *)fontSize color:(UIColor *)color;
19
+- (void)setNavigationBarFontFamily:(NSString *)fontFamily fontSize:(NSNumber *)fontSize color:(UIColor *)color;
20
 
20
 
21
-- (void)rnn_setNavigationBarTranslucent:(BOOL)translucent;
21
+- (void)setNavigationBarTranslucent:(BOOL)translucent;
22
 
22
 
23
-- (void)rnn_setNavigationBarBlur:(BOOL)blur;
23
+- (void)setNavigationBarBlur:(BOOL)blur;
24
 
24
 
25
-- (void)rnn_setNavigationBarClipsToBounds:(BOOL)clipsToBounds;
25
+- (void)setNavigationBarClipsToBounds:(BOOL)clipsToBounds;
26
 
26
 
27
-- (void)rnn_setNavigationBarLargeTitleVisible:(BOOL)visible;
27
+- (void)setNavigationBarLargeTitleVisible:(BOOL)visible;
28
 
28
 
29
-- (void)rnn_setNavigationBarLargeTitleFontFamily:(NSString *)fontFamily fontSize:(NSNumber *)fontSize color:(UIColor *)color;
29
+- (void)setNavigationBarLargeTitleFontFamily:(NSString *)fontFamily fontSize:(NSNumber *)fontSize color:(UIColor *)color;
30
 
30
 
31
-- (void)rnn_setBackButtonColor:(UIColor *)color;
31
+- (void)setBackButtonColor:(UIColor *)color;
32
 
32
 
33
 @end
33
 @end

+ 14
- 14
lib/ios/UINavigationController+RNNOptions.m View File

5
 
5
 
6
 @implementation UINavigationController (RNNOptions)
6
 @implementation UINavigationController (RNNOptions)
7
 
7
 
8
-- (void)rnn_setInteractivePopGestureEnabled:(BOOL)enabled {
8
+- (void)setInteractivePopGestureEnabled:(BOOL)enabled {
9
 	self.interactivePopGestureRecognizer.enabled = enabled;
9
 	self.interactivePopGestureRecognizer.enabled = enabled;
10
 }
10
 }
11
 
11
 
12
-- (void)rnn_setRootBackgroundImage:(UIImage *)backgroundImage {
12
+- (void)setRootBackgroundImage:(UIImage *)backgroundImage {
13
 	UIImageView* backgroundImageView = (self.view.subviews.count > 0) ? self.view.subviews[0] : nil;
13
 	UIImageView* backgroundImageView = (self.view.subviews.count > 0) ? self.view.subviews[0] : nil;
14
 	if (![backgroundImageView isKindOfClass:[UIImageView class]]) {
14
 	if (![backgroundImageView isKindOfClass:[UIImageView class]]) {
15
 		backgroundImageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
15
 		backgroundImageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
21
 	[backgroundImageView setContentMode:UIViewContentModeScaleAspectFill];
21
 	[backgroundImageView setContentMode:UIViewContentModeScaleAspectFill];
22
 }
22
 }
23
 
23
 
24
-- (void)rnn_setNavigationBarTestID:(NSString *)testID {
24
+- (void)setNavigationBarTestId:(NSString *)testID {
25
 	self.navigationBar.accessibilityIdentifier = testID;
25
 	self.navigationBar.accessibilityIdentifier = testID;
26
 }
26
 }
27
 
27
 
28
-- (void)rnn_setNavigationBarVisible:(BOOL)visible animated:(BOOL)animated {
28
+- (void)setNavigationBarVisible:(BOOL)visible animated:(BOOL)animated {
29
 	[self setNavigationBarHidden:!visible animated:animated];
29
 	[self setNavigationBarHidden:!visible animated:animated];
30
 }
30
 }
31
 
31
 
32
-- (void)rnn_hideBarsOnScroll:(BOOL)hideOnScroll {
32
+- (void)hideBarsOnScroll:(BOOL)hideOnScroll {
33
 	self.hidesBarsOnSwipe = hideOnScroll;
33
 	self.hidesBarsOnSwipe = hideOnScroll;
34
 }
34
 }
35
 
35
 
36
-- (void)rnn_setNavigationBarNoBorder:(BOOL)noBorder {
36
+- (void)setNavigationBarNoBorder:(BOOL)noBorder {
37
 	if (noBorder) {
37
 	if (noBorder) {
38
 		[self.navigationBar setShadowImage:[[UIImage alloc] init]];
38
 		[self.navigationBar setShadowImage:[[UIImage alloc] init]];
39
 	} else {
39
 	} else {
41
 	}
41
 	}
42
 }
42
 }
43
 
43
 
44
-- (void)rnn_setBarStyle:(UIBarStyle)barStyle {
44
+- (void)setBarStyle:(UIBarStyle)barStyle {
45
 	self.navigationBar.barStyle = barStyle;
45
 	self.navigationBar.barStyle = barStyle;
46
 }
46
 }
47
 
47
 
48
-- (void)rnn_setNavigationBarFontFamily:(NSString *)fontFamily fontSize:(NSNumber *)fontSize color:(UIColor *)color {
48
+- (void)setNavigationBarFontFamily:(NSString *)fontFamily fontSize:(NSNumber *)fontSize color:(UIColor *)color {
49
 	NSDictionary* fontAttributes = [RNNFontAttributesCreator createFontAttributesWithFontFamily:fontFamily fontSize:fontSize color:color];
49
 	NSDictionary* fontAttributes = [RNNFontAttributesCreator createFontAttributesWithFontFamily:fontFamily fontSize:fontSize color:color];
50
 	
50
 	
51
 	if (fontAttributes.allKeys.count > 0) {
51
 	if (fontAttributes.allKeys.count > 0) {
53
 	}
53
 	}
54
 }
54
 }
55
 
55
 
56
-- (void)rnn_setNavigationBarLargeTitleVisible:(BOOL)visible {
56
+- (void)setNavigationBarLargeTitleVisible:(BOOL)visible {
57
 	if (@available(iOS 11.0, *)) {
57
 	if (@available(iOS 11.0, *)) {
58
 		if (visible){
58
 		if (visible){
59
 			self.navigationBar.prefersLargeTitles = YES;
59
 			self.navigationBar.prefersLargeTitles = YES;
63
 	}
63
 	}
64
 }
64
 }
65
 
65
 
66
-- (void)rnn_setNavigationBarLargeTitleFontFamily:(NSString *)fontFamily fontSize:(NSNumber *)fontSize color:(UIColor *)color {
66
+- (void)setNavigationBarLargeTitleFontFamily:(NSString *)fontFamily fontSize:(NSNumber *)fontSize color:(UIColor *)color {
67
 	if (@available(iOS 11.0, *)) {
67
 	if (@available(iOS 11.0, *)) {
68
 		NSDictionary* fontAttributes = [RNNFontAttributesCreator createFontAttributesWithFontFamily:fontFamily fontSize:fontSize color:color];
68
 		NSDictionary* fontAttributes = [RNNFontAttributesCreator createFontAttributesWithFontFamily:fontFamily fontSize:fontSize color:color];
69
 		self.navigationBar.largeTitleTextAttributes = fontAttributes;
69
 		self.navigationBar.largeTitleTextAttributes = fontAttributes;
70
 	}
70
 	}
71
 }
71
 }
72
 
72
 
73
-- (void)rnn_setNavigationBarTranslucent:(BOOL)translucent {
73
+- (void)setNavigationBarTranslucent:(BOOL)translucent {
74
 	self.navigationBar.translucent = translucent;
74
 	self.navigationBar.translucent = translucent;
75
 }
75
 }
76
 
76
 
77
-- (void)rnn_setNavigationBarBlur:(BOOL)blur {
77
+- (void)setNavigationBarBlur:(BOOL)blur {
78
 	if (blur && ![self.navigationBar viewWithTag:BLUR_TOPBAR_TAG]) {
78
 	if (blur && ![self.navigationBar viewWithTag:BLUR_TOPBAR_TAG]) {
79
 		[self.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
79
 		[self.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
80
 		self.navigationBar.shadowImage = [UIImage new];
80
 		self.navigationBar.shadowImage = [UIImage new];
95
 	}
95
 	}
96
 }
96
 }
97
 
97
 
98
-- (void)rnn_setBackButtonColor:(UIColor *)color {
98
+- (void)setBackButtonColor:(UIColor *)color {
99
 	self.navigationBar.tintColor = color;
99
 	self.navigationBar.tintColor = color;
100
 }
100
 }
101
 
101
 
102
-- (void)rnn_setNavigationBarClipsToBounds:(BOOL)clipsToBounds {
102
+- (void)setNavigationBarClipsToBounds:(BOOL)clipsToBounds {
103
 	self.navigationBar.clipsToBounds = clipsToBounds;
103
 	self.navigationBar.clipsToBounds = clipsToBounds;
104
 }
104
 }
105
 
105
 

+ 8
- 8
lib/ios/UITabBarController+RNNOptions.h View File

2
 
2
 
3
 @interface UITabBarController (RNNOptions)
3
 @interface UITabBarController (RNNOptions)
4
 
4
 
5
-- (void)rnn_setCurrentTabIndex:(NSUInteger)currentTabIndex;
5
+- (void)setCurrentTabIndex:(NSUInteger)currentTabIndex;
6
 
6
 
7
-- (void)rnn_setCurrentTabID:(NSString *)tabID;
7
+- (void)setCurrentTabID:(NSString *)tabID;
8
 
8
 
9
-- (void)rnn_setTabBarTestID:(NSString *)testID;
9
+- (void)setTabBarTestID:(NSString *)testID;
10
 
10
 
11
-- (void)rnn_setTabBarBackgroundColor:(UIColor *)backgroundColor;
11
+- (void)setTabBarBackgroundColor:(UIColor *)backgroundColor;
12
 
12
 
13
-- (void)rnn_setTabBarStyle:(UIBarStyle)barStyle;
13
+- (void)setTabBarStyle:(UIBarStyle)barStyle;
14
 
14
 
15
-- (void)rnn_setTabBarTranslucent:(BOOL)translucent;
15
+- (void)setTabBarTranslucent:(BOOL)translucent;
16
 
16
 
17
-- (void)rnn_setTabBarHideShadow:(BOOL)hideShadow;
17
+- (void)setTabBarHideShadow:(BOOL)hideShadow;
18
 
18
 
19
-- (void)rnn_setTabBarVisible:(BOOL)visible animated:(BOOL)animated;
19
+- (void)setTabBarVisible:(BOOL)visible animated:(BOOL)animated;
20
 
20
 
21
 @end
21
 @end

+ 11
- 11
lib/ios/UITabBarController+RNNOptions.m View File

1
 #import "UITabBarController+RNNOptions.h"
1
 #import "UITabBarController+RNNOptions.h"
2
-#import "RNNTabBarController.h"
2
+#import "RNNBottomTabsController.h"
3
 
3
 
4
 @implementation UITabBarController (RNNOptions)
4
 @implementation UITabBarController (RNNOptions)
5
 
5
 
6
-- (void)rnn_setCurrentTabIndex:(NSUInteger)currentTabIndex {
6
+- (void)setCurrentTabIndex:(NSUInteger)currentTabIndex {
7
 	[self setSelectedIndex:currentTabIndex];
7
 	[self setSelectedIndex:currentTabIndex];
8
 }
8
 }
9
 
9
 
10
-- (void)rnn_setCurrentTabID:(NSString *)currentTabId {
11
-	[(RNNTabBarController*)self setSelectedIndexByComponentID:currentTabId];
10
+- (void)setCurrentTabID:(NSString *)currentTabId {
11
+	[(RNNBottomTabsController*)self setSelectedIndexByComponentID:currentTabId];
12
 }
12
 }
13
 
13
 
14
-- (void)rnn_setTabBarTestID:(NSString *)testID {
14
+- (void)setTabBarTestID:(NSString *)testID {
15
 	self.tabBar.accessibilityIdentifier = testID;
15
 	self.tabBar.accessibilityIdentifier = testID;
16
 }
16
 }
17
 
17
 
18
-- (void)rnn_setTabBarBackgroundColor:(UIColor *)backgroundColor {
18
+- (void)setTabBarBackgroundColor:(UIColor *)backgroundColor {
19
 	self.tabBar.barTintColor = backgroundColor;
19
 	self.tabBar.barTintColor = backgroundColor;
20
 }
20
 }
21
 
21
 
22
-- (void)rnn_setTabBarStyle:(UIBarStyle)barStyle {
22
+- (void)setTabBarStyle:(UIBarStyle)barStyle {
23
 	self.tabBar.barStyle = barStyle;
23
 	self.tabBar.barStyle = barStyle;
24
 }
24
 }
25
 
25
 
26
-- (void)rnn_setTabBarTranslucent:(BOOL)translucent {
26
+- (void)setTabBarTranslucent:(BOOL)translucent {
27
 	self.tabBar.translucent = translucent;
27
 	self.tabBar.translucent = translucent;
28
 }
28
 }
29
 
29
 
30
-- (void)rnn_setTabBarHideShadow:(BOOL)hideShadow {
30
+- (void)setTabBarHideShadow:(BOOL)hideShadow {
31
 	self.tabBar.clipsToBounds = hideShadow;
31
 	self.tabBar.clipsToBounds = hideShadow;
32
 }
32
 }
33
 
33
 
34
-- (void)rnn_setTabBarVisible:(BOOL)visible animated:(BOOL)animated {
34
+- (void)setTabBarVisible:(BOOL)visible animated:(BOOL)animated {
35
     const CGRect tabBarFrame = self.tabBar.frame;
35
     const CGRect tabBarFrame = self.tabBar.frame;
36
 	const CGRect tabBarVisibleFrame = CGRectMake(tabBarFrame.origin.x,
36
 	const CGRect tabBarVisibleFrame = CGRectMake(tabBarFrame.origin.x,
37
 												 self.view.frame.size.height - tabBarFrame.size.height,
37
 												 self.view.frame.size.height - tabBarFrame.size.height,
74
 	}
74
 	}
75
 }
75
 }
76
 
76
 
77
-- (void)rnn_forEachTab:(void (^)(UIView *, UIViewController * tabViewController, int tabIndex))performOnTab {
77
+- (void)forEachTab:(void (^)(UIView *, UIViewController * tabViewController, int tabIndex))performOnTab {
78
     int tabIndex = 0;
78
     int tabIndex = 0;
79
     for (UIView * tab in self.tabBar.subviews) {
79
     for (UIView * tab in self.tabBar.subviews) {
80
         if ([NSStringFromClass([tab class]) isEqualToString:@"UITabBarButton"]) {
80
         if ([NSStringFromClass([tab class]) isEqualToString:@"UITabBarButton"]) {

+ 1
- 1
lib/ios/UIViewController+LayoutProtocol.h View File

25
 @property (nonatomic, strong) RNNNavigationOptions* options;
25
 @property (nonatomic, strong) RNNNavigationOptions* options;
26
 @property (nonatomic, strong) RNNNavigationOptions* defaultOptions;
26
 @property (nonatomic, strong) RNNNavigationOptions* defaultOptions;
27
 @property (nonatomic, strong) RNNEventEmitter* eventEmitter;
27
 @property (nonatomic, strong) RNNEventEmitter* eventEmitter;
28
-@property (nonatomic) id<RNNRootViewCreator> creator;
28
+@property (nonatomic) id<RNNComponentViewCreator> creator;
29
 
29
 
30
 @end
30
 @end

+ 5
- 5
lib/ios/UIViewController+LayoutProtocol.m View File

5
 @implementation UIViewController (LayoutProtocol)
5
 @implementation UIViewController (LayoutProtocol)
6
 
6
 
7
 - (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo
7
 - (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo
8
-						   creator:(id<RNNRootViewCreator>)creator
8
+						   creator:(id<RNNComponentViewCreator>)creator
9
 						   options:(RNNNavigationOptions *)options
9
 						   options:(RNNNavigationOptions *)options
10
 					defaultOptions:(RNNNavigationOptions *)defaultOptions
10
 					defaultOptions:(RNNNavigationOptions *)defaultOptions
11
 						 presenter:(RNNBasePresenter *)presenter
11
 						 presenter:(RNNBasePresenter *)presenter
30
 
30
 
31
 - (void)mergeOptions:(RNNNavigationOptions *)options {
31
 - (void)mergeOptions:(RNNNavigationOptions *)options {
32
     [self.options overrideOptions:options];
32
     [self.options overrideOptions:options];
33
-	[self.presenter mergeOptions:options currentOptions:self.resolveOptions];
33
+    [self.presenter mergeOptions:options resolvedOptions:self.resolveOptions];
34
     [self.parentViewController mergeChildOptions:options];
34
     [self.parentViewController mergeChildOptions:options];
35
 }
35
 }
36
 
36
 
37
 - (void)mergeChildOptions:(RNNNavigationOptions *)options {
37
 - (void)mergeChildOptions:(RNNNavigationOptions *)options {
38
-	[self.presenter mergeOptions:options currentOptions:self.resolveOptions];
38
+    [self.presenter mergeOptions:options resolvedOptions:self.resolveOptions];
39
 	[self.parentViewController mergeChildOptions:options];
39
 	[self.parentViewController mergeChildOptions:options];
40
 }
40
 }
41
 
41
 
136
 	objc_setAssociatedObject(self, @selector(eventEmitter), eventEmitter, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
136
 	objc_setAssociatedObject(self, @selector(eventEmitter), eventEmitter, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
137
 }
137
 }
138
 
138
 
139
-- (id<RNNRootViewCreator>)creator {
139
+- (id<RNNComponentViewCreator>)creator {
140
 	return objc_getAssociatedObject(self, @selector(creator));
140
 	return objc_getAssociatedObject(self, @selector(creator));
141
 }
141
 }
142
 
142
 
143
-- (void)setCreator:(id<RNNRootViewCreator>)creator {
143
+- (void)setCreator:(id<RNNComponentViewCreator>)creator {
144
 	objc_setAssociatedObject(self, @selector(creator), creator, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
144
 	objc_setAssociatedObject(self, @selector(creator), creator, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
145
 }
145
 }
146
 
146
 

+ 15
- 19
lib/ios/UIViewController+RNNOptions.h View File

6
 
6
 
7
 @interface UIViewController (RNNOptions)
7
 @interface UIViewController (RNNOptions)
8
 
8
 
9
-- (void)rnn_setBackgroundImage:(UIImage *)backgroundImage;
9
+- (void)setBackgroundImage:(UIImage *)backgroundImage;
10
 
10
 
11
-- (void)rnn_setModalPresentationStyle:(UIModalPresentationStyle)modalPresentationStyle;
11
+- (void)setSearchBarWithPlaceholder:(NSString *)placeholder hideNavBarOnFocusSearchBar:(BOOL)hideNavBarOnFocusSearchBar;
12
 
12
 
13
-- (void)rnn_setModalTransitionStyle:(UIModalTransitionStyle)modalTransitionStyle;
13
+- (void)setSearchBarHiddenWhenScrolling:(BOOL)searchBarHidden;
14
 
14
 
15
-- (void)rnn_setSearchBarWithPlaceholder:(NSString *)placeholder hideNavBarOnFocusSearchBar:(BOOL)hideNavBarOnFocusSearchBar;
15
+- (void)setDrawBehindTopBar:(BOOL)drawBehind;
16
 
16
 
17
-- (void)rnn_setSearchBarHiddenWhenScrolling:(BOOL)searchBarHidden;
17
+- (void)setDrawBehindTabBar:(BOOL)drawBehindTabBar;
18
 
18
 
19
-- (void)rnn_setDrawBehindTopBar:(BOOL)drawBehind;
19
+- (void)setTabBarItemBadgeColor:(UIColor *)badgeColor;
20
 
20
 
21
-- (void)rnn_setDrawBehindTabBar:(BOOL)drawBehindTabBar;
21
+- (void)setTabBarItemBadge:(NSString *)badge;
22
 
22
 
23
-- (void)rnn_setTabBarItemBadgeColor:(UIColor *)badgeColor;
23
+- (void)setTopBarPrefersLargeTitle:(BOOL)prefersLargeTitle;
24
 
24
 
25
-- (void)rnn_setTabBarItemBadge:(NSString *)badge;
25
+- (void)setNavigationItemTitle:(NSString *)title;
26
 
26
 
27
-- (void)rnn_setTopBarPrefersLargeTitle:(BOOL)prefersLargeTitle;
27
+- (void)setStatusBarStyle:(NSString *)style animated:(BOOL)animated;
28
 
28
 
29
-- (void)rnn_setNavigationItemTitle:(NSString *)title;
29
+- (void)setStatusBarBlur:(BOOL)blur;
30
 
30
 
31
-- (void)rnn_setStatusBarStyle:(NSString *)style animated:(BOOL)animated;
31
+- (void)setBackButtonVisible:(BOOL)visible;
32
 
32
 
33
-- (void)rnn_setStatusBarBlur:(BOOL)blur;
33
+- (void)setBackgroundColor:(UIColor *)backgroundColor;
34
 
34
 
35
-- (void)rnn_setBackButtonVisible:(BOOL)visible;
35
+- (void)setInterceptTouchOutside:(BOOL)interceptTouchOutside;
36
 
36
 
37
-- (void)rnn_setBackgroundColor:(UIColor *)backgroundColor;
38
-
39
-- (void)rnn_setInterceptTouchOutside:(BOOL)interceptTouchOutside;
40
-
41
-- (void)rnn_setBackButtonIcon:(UIImage *)icon withColor:(UIColor *)color title:(NSString *)title;
37
+- (void)setBackButtonIcon:(UIImage *)icon withColor:(UIColor *)color title:(NSString *)title;
42
 
38
 
43
 - (void)applyBackButton:(RNNBackButtonOptions *)backButton;
39
 - (void)applyBackButton:(RNNBackButtonOptions *)backButton;
44
 
40
 

+ 16
- 24
lib/ios/UIViewController+RNNOptions.m View File

10
 
10
 
11
 @implementation UIViewController (RNNOptions)
11
 @implementation UIViewController (RNNOptions)
12
 
12
 
13
-- (void)rnn_setBackgroundImage:(UIImage *)backgroundImage {
13
+- (void)setBackgroundImage:(UIImage *)backgroundImage {
14
 	if (backgroundImage) {
14
 	if (backgroundImage) {
15
 		UIImageView* backgroundImageView = (self.view.subviews.count > 0) ? self.view.subviews[0] : nil;
15
 		UIImageView* backgroundImageView = (self.view.subviews.count > 0) ? self.view.subviews[0] : nil;
16
 		if (![backgroundImageView isKindOfClass:[UIImageView class]]) {
16
 		if (![backgroundImageView isKindOfClass:[UIImageView class]]) {
24
 	}
24
 	}
25
 }
25
 }
26
 
26
 
27
-- (void)rnn_setModalPresentationStyle:(UIModalPresentationStyle)modalPresentationStyle {
28
-	self.modalPresentationStyle = modalPresentationStyle;
29
-}
30
-
31
-- (void)rnn_setModalTransitionStyle:(UIModalTransitionStyle)modalTransitionStyle {
32
-	self.modalTransitionStyle = modalTransitionStyle;
33
-}
34
-
35
-- (void)rnn_setSearchBarWithPlaceholder:(NSString *)placeholder
36
-						hideNavBarOnFocusSearchBar:(BOOL)hideNavBarOnFocusSearchBar {
27
+- (void)setSearchBarWithPlaceholder:(NSString *)placeholder
28
+		 hideNavBarOnFocusSearchBar:(BOOL)hideNavBarOnFocusSearchBar {
37
 	if (@available(iOS 11.0, *)) {
29
 	if (@available(iOS 11.0, *)) {
38
 		if (!self.navigationItem.searchController) {
30
 		if (!self.navigationItem.searchController) {
39
 			UISearchController *search = [[UISearchController alloc]initWithSearchResultsController:nil];
31
 			UISearchController *search = [[UISearchController alloc]initWithSearchResultsController:nil];
55
 	}
47
 	}
56
 }
48
 }
57
 
49
 
58
-- (void)rnn_setSearchBarHiddenWhenScrolling:(BOOL)searchBarHidden {
50
+- (void)setSearchBarHiddenWhenScrolling:(BOOL)searchBarHidden {
59
 	if (@available(iOS 11.0, *)) {
51
 	if (@available(iOS 11.0, *)) {
60
 		self.navigationItem.hidesSearchBarWhenScrolling = searchBarHidden;
52
 		self.navigationItem.hidesSearchBarWhenScrolling = searchBarHidden;
61
 	}
53
 	}
62
 }
54
 }
63
 
55
 
64
-- (void)rnn_setNavigationItemTitle:(NSString *)title {
56
+- (void)setNavigationItemTitle:(NSString *)title {
65
 	self.navigationItem.title = title;
57
 	self.navigationItem.title = title;
66
 }
58
 }
67
 
59
 
68
-- (void)rnn_setDrawBehindTopBar:(BOOL)drawBehind {
60
+- (void)setDrawBehindTopBar:(BOOL)drawBehind {
69
 	if (drawBehind) {
61
 	if (drawBehind) {
70
 		[self setExtendedLayoutIncludesOpaqueBars:YES];
62
 		[self setExtendedLayoutIncludesOpaqueBars:YES];
71
 		self.edgesForExtendedLayout |= UIRectEdgeTop;
63
 		self.edgesForExtendedLayout |= UIRectEdgeTop;
74
 	}
66
 	}
75
 }
67
 }
76
 
68
 
77
-- (void)rnn_setDrawBehindTabBar:(BOOL)drawBehindTabBar {
69
+- (void)setDrawBehindTabBar:(BOOL)drawBehindTabBar {
78
 	if (drawBehindTabBar) {
70
 	if (drawBehindTabBar) {
79
 		[self setExtendedLayoutIncludesOpaqueBars:YES];
71
 		[self setExtendedLayoutIncludesOpaqueBars:YES];
80
 		self.edgesForExtendedLayout |= UIRectEdgeBottom;
72
 		self.edgesForExtendedLayout |= UIRectEdgeBottom;
83
 	}
75
 	}
84
 }
76
 }
85
 
77
 
86
-- (void)rnn_setTabBarItemBadge:(NSString *)badge {
78
+- (void)setTabBarItemBadge:(NSString *)badge {
87
     UITabBarItem *tabBarItem = self.tabBarItem;
79
     UITabBarItem *tabBarItem = self.tabBarItem;
88
 
80
 
89
     if ([badge isKindOfClass:[NSNull class]] || [badge isEqualToString:@""]) {
81
     if ([badge isKindOfClass:[NSNull class]] || [badge isEqualToString:@""]) {
95
     }
87
     }
96
 }
88
 }
97
 
89
 
98
-- (void)rnn_setTabBarItemBadgeColor:(UIColor *)badgeColor {
90
+- (void)setTabBarItemBadgeColor:(UIColor *)badgeColor {
99
 	if (@available(iOS 10.0, *)) {
91
 	if (@available(iOS 10.0, *)) {
100
 		self.tabBarItem.badgeColor = badgeColor;
92
 		self.tabBarItem.badgeColor = badgeColor;
101
 	}
93
 	}
102
 }
94
 }
103
 
95
 
104
-- (void)rnn_setStatusBarStyle:(NSString *)style animated:(BOOL)animated {
96
+- (void)setStatusBarStyle:(NSString *)style animated:(BOOL)animated {
105
 	if (animated) {
97
 	if (animated) {
106
 		[UIView animateWithDuration:[self statusBarAnimationDuration:animated] animations:^{
98
 		[UIView animateWithDuration:[self statusBarAnimationDuration:animated] animations:^{
107
 			[self setNeedsStatusBarAppearanceUpdate];
99
 			[self setNeedsStatusBarAppearanceUpdate];
111
 	}
103
 	}
112
 }
104
 }
113
 
105
 
114
-- (void)rnn_setTopBarPrefersLargeTitle:(BOOL)prefersLargeTitle {
106
+- (void)setTopBarPrefersLargeTitle:(BOOL)prefersLargeTitle {
115
 	if (@available(iOS 11.0, *)) {
107
 	if (@available(iOS 11.0, *)) {
116
 		if (prefersLargeTitle) {
108
 		if (prefersLargeTitle) {
117
 			self.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeAlways;
109
 			self.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeAlways;
122
 }
114
 }
123
 
115
 
124
 
116
 
125
-- (void)rnn_setStatusBarBlur:(BOOL)blur {
117
+- (void)setStatusBarBlur:(BOOL)blur {
126
 	UIView* curBlurView = [self.view viewWithTag:BLUR_STATUS_TAG];
118
 	UIView* curBlurView = [self.view viewWithTag:BLUR_STATUS_TAG];
127
 	if (blur) {
119
 	if (blur) {
128
 		if (!curBlurView) {
120
 		if (!curBlurView) {
138
 	}
130
 	}
139
 }
131
 }
140
 
132
 
141
-- (void)rnn_setBackgroundColor:(UIColor *)backgroundColor {
133
+- (void)setBackgroundColor:(UIColor *)backgroundColor {
142
 	self.view.backgroundColor = backgroundColor;
134
 	self.view.backgroundColor = backgroundColor;
143
 }
135
 }
144
 
136
 
145
-- (void)rnn_setBackButtonVisible:(BOOL)visible {
137
+- (void)setBackButtonVisible:(BOOL)visible {
146
 	self.navigationItem.hidesBackButton = !visible;
138
 	self.navigationItem.hidesBackButton = !visible;
147
 }
139
 }
148
 
140
 
161
 	return NO;
153
 	return NO;
162
 }
154
 }
163
 
155
 
164
-- (void)rnn_setInterceptTouchOutside:(BOOL)interceptTouchOutside {
156
+- (void)setInterceptTouchOutside:(BOOL)interceptTouchOutside {
165
 	if ([self.view isKindOfClass:[RCTRootView class]]) {
157
 	if ([self.view isKindOfClass:[RCTRootView class]]) {
166
 		RCTRootView* rootView = (RCTRootView*)self.view;
158
 		RCTRootView* rootView = (RCTRootView*)self.view;
167
 		rootView.passThroughTouches = !interceptTouchOutside;
159
 		rootView.passThroughTouches = !interceptTouchOutside;
168
 	}
160
 	}
169
 }
161
 }
170
 
162
 
171
-- (void)rnn_setBackButtonIcon:(UIImage *)icon withColor:(UIColor *)color title:(NSString *)title {
163
+- (void)setBackButtonIcon:(UIImage *)icon withColor:(UIColor *)color title:(NSString *)title {
172
 	UIBarButtonItem *backItem = [[UIBarButtonItem alloc] init];
164
 	UIBarButtonItem *backItem = [[UIBarButtonItem alloc] init];
173
 	if (icon) {
165
 	if (icon) {
174
 		backItem.image = color
166
 		backItem.image = color