Pārlūkot izejas kodu

fixed drawer animation warning on iOS

Daniel Zlotin 8 gadus atpakaļ
vecāks
revīzija
248ee9eb80
2 mainītis faili ar 21 papildinājumiem un 40 dzēšanām
  1. 17
    36
      example/src/app.js
  2. 4
    4
      src/deprecated/platformSpecificDeprecated.ios.js

+ 17
- 36
example/src/app.js Parādīt failu

@@ -3,51 +3,32 @@ import {
3 3
   AppRegistry,
4 4
   View
5 5
 } from 'react-native';
6
-import { Navigation } from 'react-native-navigation';
6
+import {Navigation} from 'react-native-navigation';
7 7
 
8 8
 // screen related book keeping
9
-import { registerScreens } from './screens';
9
+import {registerScreens} from './screens';
10 10
 registerScreens();
11 11
 
12 12
 // this will start our app
13
-Navigation.startTabBasedApp({
14
-  tabs: [
15
-    {
16
-      label: 'One',
17
-      screen: 'example.FirstTabScreen',
18
-      icon: require('../img/one.png'),
19
-      selectedIcon: require('../img/one_selected.png'),
20
-      title: 'Screen One'
21
-    },
22
-    {
23
-      label: 'Two',
24
-      screen: 'example.SecondTabScreen',
25
-      icon: require('../img/two.png'),
26
-      selectedIcon: require('../img/two_selected.png'),
27
-      title: 'Screen Two'
28
-    },
29
-    {
30
-      label: 'Three',
31
-      screen: 'example.ThirdTabScreen',
32
-      icon: require('../img/three.png'),
33
-      selectedIcon: require('../img/three_selected.png'),
34
-      title: 'Screen Three',
35
-      navigatorStyle: {
36
-        navBarBackgroundColor: '#4dbce9',
37
-        navBarTextColor: '#ffff00',
38
-        navBarButtonColor: '#ffffff',
39
-        statusBarTextColorScheme: 'light'
40
-      }
13
+Navigation.startSingleScreenApp({
14
+  screen: {
15
+    screen: 'example.FirstTabScreen',
16
+    title: 'Login',
17
+    navigatorStyle: {
18
+      navBarBackgroundColor: '#4dbce9',
19
+      navBarTextColor: '#ffff00',
20
+      navBarButtonColor: '#ffffff',
21
+      statusBarTextColorScheme: 'light'
41 22
     }
42
-  ],
43
-  // tabsStyle: {
44
-  //   tabBarButtonColor: '#ffff00',
45
-  //   tabBarSelectedButtonColor: '#ff9900',
46
-  //   tabBarBackgroundColor: '#551A8B'
47
-  // },
23
+  },
48 24
   drawer: {
49 25
     left: {
50 26
       screen: 'example.SideMenu'
51 27
     }
52 28
   }
29
+  // tabsStyle: {
30
+  //   tabBarButtonColor: '#ffff00',
31
+  //   tabBarSelectedButtonColor: '#ff9900',
32
+  //   tabBarBackgroundColor: '#551A8B'
33
+  // },
53 34
 });

+ 4
- 4
src/deprecated/platformSpecificDeprecated.ios.js Parādīt failu

@@ -28,8 +28,8 @@ function startTabBasedApp(params) {
28 28
                                componentRight={params.drawer.right ? params.drawer.right.screen : undefined}
29 29
                                passPropsRight={{navigatorID: navigatorID}}
30 30
                                disableOpenGesture={params.drawer.disableOpenGesture}
31
-                               type={params.drawer.type ? params.drawer.type : undefined}
32
-                               animationType={params.drawer.animationType ? params.drawer.animationType : undefined}
31
+                               type={params.drawer.type ? params.drawer.type : 'MMDrawer'}
32
+                               animationType={params.drawer.animationType ? params.drawer.animationType : 'slide'}
33 33
           >
34 34
             {this.renderBody()}
35 35
           </DrawerControllerIOS>
@@ -103,8 +103,8 @@ function startSingleScreenApp(params) {
103 103
                                componentRight={params.drawer.right ? params.drawer.right.screen : undefined}
104 104
                                passPropsRight={{navigatorID: navigatorID}}
105 105
                                disableOpenGesture={params.drawer.disableOpenGesture}
106
-                               type={params.drawer.type ? params.drawer.type : undefined}
107
-                               animationType={params.drawer.animationType ? params.drawer.animationType : undefined}
106
+                               type={params.drawer.type ? params.drawer.type : 'MMDrawer'}
107
+                               animationType={params.drawer.animationType ? params.drawer.animationType : 'slide'}
108 108
           >
109 109
             {this.renderBody()}
110 110
           </DrawerControllerIOS>