Sfoglia il codice sorgente

allow to disable the side menu swipe gesture

talkol 8 anni fa
parent
commit
a61d69d5fe
2 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. 4
    2
      README.md
  2. 2
    0
      src/platformSpecific.ios.js

+ 4
- 2
README.md Vedi File

@@ -172,7 +172,8 @@ Navigation.startTabBasedApp({
172 172
     },
173 173
     right: { // optional, define if you want a drawer from the right
174 174
       screen: 'example.SecondSideMenu' // unique ID registered with Navigation.registerScreen
175
-    }
175
+    },
176
+    disableOpenGesture: false // optional, can the drawer be opened with a swipe instead of button
176 177
   },
177 178
   passProps: {}, // simple serializable object that will pass as props to all top screens (optional)
178 179
   animationType: 'slide-down' // optional, add transition animation to root change: 'none', 'slide-down', 'fade'
@@ -197,7 +198,8 @@ Navigation.startSingleScreenApp({
197 198
     },
198 199
     right: { // optional, define if you want a drawer from the right
199 200
       screen: 'example.SecondSideMenu' // unique ID registered with Navigation.registerScreen
200
-    }
201
+    },
202
+    disableOpenGesture: false // optional, can the drawer be opened with a swipe instead of button
201 203
   },
202 204
   passProps: {}, // simple serializable object that will pass as props to all top screens (optional)
203 205
   animationType: 'slide-down' // optional, add transition animation to root change: 'none', 'slide-down', 'fade'

+ 2
- 0
src/platformSpecific.ios.js Vedi File

@@ -27,6 +27,7 @@ function startTabBasedApp(params) {
27 27
             passPropsLeft={{navigatorID: navigatorID}}
28 28
             componentRight={params.drawer.right ? params.drawer.right.screen : undefined}
29 29
             passPropsRight={{navigatorID: navigatorID}}
30
+            disableOpenGesture={params.drawer.disableOpenGesture}
30 31
           >
31 32
             {this.renderBody()}
32 33
           </DrawerControllerIOS>
@@ -97,6 +98,7 @@ function startSingleScreenApp(params) {
97 98
             passPropsLeft={{navigatorID: navigatorID}}
98 99
             componentRight={params.drawer.right ? params.drawer.right.screen : undefined}
99 100
             passPropsRight={{navigatorID: navigatorID}}
101
+            disableOpenGesture={params.drawer.disableOpenGesture}
100 102
           >
101 103
             {this.renderBody()}
102 104
           </DrawerControllerIOS>