Browse Source

playground bootstrapped to Navigation

Daniel Zlotin 8 years ago
parent
commit
cd0a6c5987
2 changed files with 11 additions and 11 deletions
  1. 4
    4
      playground/ios/playground/AppDelegate.m
  2. 7
    7
      playground/src/app.js

+ 4
- 4
playground/ios/playground/AppDelegate.m View File

25
   // **********************************************
25
   // **********************************************
26
   // *** DON'T MISS: THIS IS HOW WE BOOTSTRAP *****
26
   // *** DON'T MISS: THIS IS HOW WE BOOTSTRAP *****
27
   // **********************************************
27
   // **********************************************
28
-  /*self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
28
+  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
29
   self.window.backgroundColor = [UIColor whiteColor];
29
   self.window.backgroundColor = [UIColor whiteColor];
30
-  [[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation];*/
30
+  [[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation];
31
 
31
 
32
-  
32
+  /*
33
   // original RN bootstrap - remove this part
33
   // original RN bootstrap - remove this part
34
   RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
34
   RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
35
                                                       moduleName:@"com.example.WelcomeScreen"
35
                                                       moduleName:@"com.example.WelcomeScreen"
40
   rootViewController.view = rootView;
40
   rootViewController.view = rootView;
41
   self.window.rootViewController = rootViewController;
41
   self.window.rootViewController = rootViewController;
42
   [self.window makeKeyAndVisible];
42
   [self.window makeKeyAndVisible];
43
-  
43
+  */
44
 
44
 
45
 
45
 
46
   return YES;
46
   return YES;

+ 7
- 7
playground/src/app.js View File

1
 import React, {Component} from 'react';
1
 import React, {Component} from 'react';
2
 import {AppRegistry, View, Text} from 'react-native';
2
 import {AppRegistry, View, Text} from 'react-native';
3
 
3
 
4
-//import Navigation from 'react-native-navigation';
4
+import Navigation from 'react-native-navigation';
5
 
5
 
6
 const styles = {
6
 const styles = {
7
   root: {
7
   root: {
28
 }
28
 }
29
 
29
 
30
 export function start() {
30
 export function start() {
31
-  AppRegistry.registerComponent('com.example.WelcomeScreen', () => WelcomeScreen);
32
-  //Navigation.startApp({
33
-  //  container: {
34
-  //    key: 'com.example.WelcomeScreen'
35
-  //  }
36
-  //});
31
+  Navigation.registerContainer(`com.example.WelcomeScreen`, () => WelcomeScreen);
32
+  Navigation.startApp({
33
+    container: {
34
+      key: 'com.example.WelcomeScreen'
35
+    }
36
+  });
37
 }
37
 }
38
 
38