瀏覽代碼

migration to new API

Daniel Zlotin 7 年之前
父節點
當前提交
7cd03b33f3
共有 3 個文件被更改,包括 8 次插入13 次删除
  1. 4
    4
      lib/ios/RNNControllerFactory.m
  2. 2
    3
      lib/ios/RNNLayoutNode.h
  3. 2
    6
      lib/ios/RNNLayoutNode.m

+ 4
- 4
lib/ios/RNNControllerFactory.m 查看文件

44
 	
44
 	
45
 	UIViewController<RNNRootViewProtocol> *result;
45
 	UIViewController<RNNRootViewProtocol> *result;
46
 	
46
 	
47
-	if ( node.isContainer || node.isTopTab) {
47
+	if ( node.isComponent) {
48
 		result = [self createContainer:node];
48
 		result = [self createContainer:node];
49
 	}
49
 	}
50
 	
50
 	
51
-	else if (node.isContainerStack)	{
52
-		result = [self createContainerStack:node];
51
+	else if (node.isStack)	{
52
+		result = [self createStack:node];
53
 	}
53
 	}
54
 	
54
 	
55
 	else if (node.isTabs) {
55
 	else if (node.isTabs) {
97
 	return container;
97
 	return container;
98
 }
98
 }
99
 
99
 
100
-- (UIViewController<RNNRootViewProtocol> *)createContainerStack:(RNNLayoutNode*)node {
100
+- (UIViewController<RNNRootViewProtocol> *)createStack:(RNNLayoutNode*)node {
101
 	RNNNavigationController* vc = [[RNNNavigationController alloc] init];
101
 	RNNNavigationController* vc = [[RNNNavigationController alloc] init];
102
 	
102
 	
103
 	NSMutableArray* controllers = [NSMutableArray new];
103
 	NSMutableArray* controllers = [NSMutableArray new];

+ 2
- 3
lib/ios/RNNLayoutNode.h 查看文件

11
 
11
 
12
 +(instancetype)create:(NSDictionary *)json;
12
 +(instancetype)create:(NSDictionary *)json;
13
 
13
 
14
--(BOOL)isContainer;
15
--(BOOL)isContainerStack;
14
+-(BOOL)isComponent;
15
+-(BOOL)isStack;
16
 -(BOOL)isTabs;
16
 -(BOOL)isTabs;
17
 -(BOOL)isTopTabs;
17
 -(BOOL)isTopTabs;
18
--(BOOL)isTopTab;
19
 -(BOOL)isSideMenuRoot;
18
 -(BOOL)isSideMenuRoot;
20
 -(BOOL)isSideMenuLeft;
19
 -(BOOL)isSideMenuLeft;
21
 -(BOOL)isSideMenuRight;
20
 -(BOOL)isSideMenuRight;

+ 2
- 6
lib/ios/RNNLayoutNode.m 查看文件

13
 	return node;
13
 	return node;
14
 }
14
 }
15
 
15
 
16
--(BOOL)isContainer
16
+-(BOOL)isComponent
17
 {
17
 {
18
 	return [self.type isEqualToString:@"Component"];
18
 	return [self.type isEqualToString:@"Component"];
19
 }
19
 }
20
--(BOOL)isContainerStack
20
+-(BOOL)isStack
21
 {
21
 {
22
 	return [self.type isEqualToString:@"Stack"];
22
 	return [self.type isEqualToString:@"Stack"];
23
 }
23
 }
29
 {
29
 {
30
 	return [self.type isEqualToString:@"TopTabs"];
30
 	return [self.type isEqualToString:@"TopTabs"];
31
 }
31
 }
32
--(BOOL)isTopTab
33
-{
34
-	return [self.type isEqualToString:@"TopTab"];
35
-}
36
 -(BOOL)isSideMenuRoot
32
 -(BOOL)isSideMenuRoot
37
 {
33
 {
38
 	return [self.type isEqualToString:@"SideMenuRoot"];
34
 	return [self.type isEqualToString:@"SideMenuRoot"];