Browse Source

support transition animations on root changes

talkol 8 years ago
parent
commit
713ca27da5

+ 4
- 2
README.md View File

@@ -151,7 +151,8 @@ Navigation.startTabBasedApp({
151 151
     right: { // optional, define if you want a drawer from the right
152 152
       screen: 'example.SecondSideMenu' // unique ID registered with Navigation.registerScreen
153 153
     }
154
-  }
154
+  },
155
+  animationType: 'slide-down' // optional, add transition animation to root change: 'none', 'slide-down', 'fade'
155 156
 });
156 157
 ```
157 158
 
@@ -173,7 +174,8 @@ Navigation.startSingleScreenApp({
173 174
     right: { // optional, define if you want a drawer from the right
174 175
       screen: 'example.SecondSideMenu' // unique ID registered with Navigation.registerScreen
175 176
     }
176
-  }
177
+  },
178
+  animationType: 'slide-down' // optional, add transition animation to root change: 'none', 'slide-down', 'fade'
177 179
 });
178 180
 ```
179 181
 

+ 1
- 1
example-redux/ios/exampleRedux/AppDelegate.m View File

@@ -24,7 +24,7 @@
24 24
   // **********************************************
25 25
   self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
26 26
   self.window.backgroundColor = [UIColor whiteColor];
27
-  [[RCCManager sharedIntance] initBridgeWithBundleURL:jsCodeLocation];
27
+  [[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation];
28 28
   
29 29
   /*
30 30
    // original RN bootstrap - remove this part

+ 2
- 1
example-redux/src/app.js View File

@@ -60,7 +60,8 @@ export default class App {
60 60
               title: 'Screen Two',
61 61
               navigatorStyle: {}
62 62
             }
63
-          ]
63
+          ],
64
+          animationType: 'slide-down'
64 65
         });
65 66
         return;
66 67
       default:

+ 2
- 2
src/platformSpecific.ios.js View File

@@ -76,7 +76,7 @@ function startTabBasedApp(params) {
76 76
     }
77 77
   });
78 78
   ControllerRegistry.registerController(controllerID, () => Controller);
79
-  ControllerRegistry.setRootController(controllerID);
79
+  ControllerRegistry.setRootController(controllerID, params.animationType);
80 80
 }
81 81
 
82 82
 function startSingleScreenApp(params) {
@@ -134,7 +134,7 @@ function startSingleScreenApp(params) {
134 134
     }
135 135
   });
136 136
   ControllerRegistry.registerController(controllerID, () => Controller);
137
-  ControllerRegistry.setRootController(controllerID);
137
+  ControllerRegistry.setRootController(controllerID, params.animationType);
138 138
 }
139 139
 
140 140
 function _mergeScreenSpecificSettings(screenID, screenInstanceID, params) {