|
@@ -22,19 +22,7 @@ typedef enum
|
22
|
22
|
@implementation RNNViewController
|
23
|
23
|
|
24
|
24
|
|
25
|
|
-+(SideMenuMode)sideMenuModeForLayout:(NSDictionary*)layout {
|
26
|
|
- NSDictionary *sideMenu = layout[SIDE_MENU];
|
27
|
|
- SideMenuMode mode = SideMenuModeNone;
|
28
|
|
- if (sideMenu) {
|
29
|
|
- if (sideMenu[SIDE_MENU_LEFT]) {
|
30
|
|
- mode |= SideMenuModeLeft;
|
31
|
|
- }
|
32
|
|
- if (sideMenu[SIDE_MENU_RIGHT]) {
|
33
|
|
- mode |= SideMenuModeRight;
|
34
|
|
- }
|
35
|
|
- }
|
36
|
|
- return mode;
|
37
|
|
-}
|
|
25
|
+#pragma mark - External methods
|
38
|
26
|
|
39
|
27
|
|
40
|
28
|
+ (UIViewController*)controllerWithLayout:(NSDictionary *)layout bridge:(RCTBridge *)bridge {
|
|
@@ -56,6 +44,24 @@ typedef enum
|
56
|
44
|
}
|
57
|
45
|
|
58
|
46
|
|
|
47
|
+#pragma mark - Helper methods
|
|
48
|
+
|
|
49
|
+
|
|
50
|
++(SideMenuMode)sideMenuModeForLayout:(NSDictionary*)layout {
|
|
51
|
+ NSDictionary *sideMenu = layout[SIDE_MENU];
|
|
52
|
+ SideMenuMode mode = SideMenuModeNone;
|
|
53
|
+ if (sideMenu) {
|
|
54
|
+ if (sideMenu[SIDE_MENU_LEFT]) {
|
|
55
|
+ mode |= SideMenuModeLeft;
|
|
56
|
+ }
|
|
57
|
+ if (sideMenu[SIDE_MENU_RIGHT]) {
|
|
58
|
+ mode |= SideMenuModeRight;
|
|
59
|
+ }
|
|
60
|
+ }
|
|
61
|
+ return mode;
|
|
62
|
+}
|
|
63
|
+
|
|
64
|
+
|
59
|
65
|
+(UIViewController*)centerControllerWithLayout:(NSDictionary*)layout bridge:(RCTBridge*)bridge {
|
60
|
66
|
UIViewController *controller = nil;
|
61
|
67
|
|