我尝试过很多建议https://github.com/react-navigation/react-navigation/issues/5370 https://github.com/react-navigation/react-navigation/issues/5370但他们都没有。
Android 平台上的抽屉关闭正常。这仅发生在 iOS 中。
我不确定但是有一些react-native-reanimated
or react-native-gesture-handler
库版本。
我还尝试按照此链接中的步骤进行操作。https://reactnavigation.org/docs/getting-started/ https://reactnavigation.org/docs/getting-started/
非常感谢某人的帮助。谢谢
下面是我的包、应用程序和索引文件。
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/bottom-tabs": "^5.11.10",
"@react-navigation/drawer": "^5.12.5",
"@react-navigation/material-top-tabs": "^5.3.15",
"@react-navigation/native": "^5.9.4",
"@react-navigation/stack": "^5.14.4",
"react-native": "0.64.2",
"react-native-animatable": "^1.3.3",
"react-native-code-push": "^7.0.1",
"react-native-collapsible": "^1.6.0",
"react-native-dropdown-picker": "^5.0.0",
"react-native-fast-image": "^8.3.4",
"react-native-gesture-handler": "^1.10.3",
"react-native-get-random-values": "^1.7.0",
"react-native-haptic-feedback": "^1.11.0",
"react-native-image-picker": "^4.0.3",
"react-native-keyboard-aware-scroll-view": "^0.9.4",
"react-native-modal": "^11.10.0",
"react-native-onesignal": "^4.1.0",
"react-native-paper": "^4.8.1",
"react-native-progress": "^4.1.2",
"react-native-reanimated": "2.2.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.1.1",
"react-native-snap-carousel": "^3.9.1",
"react-native-spinkit": "^1.5.1",
"react-native-splash-screen": "^3.2.0",
"react-native-swiper": "^1.6.0",
"react-native-switch": "^2.0.0",
"react-native-tab-view": "^2.16.0",
"react-native-vector-icons": "^8.1.0",
"sanitize-html": "^2.3.3",
"uuid": "^8.3.2"
index.js
import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
AppRegistry.registerComponent(appName, () => gestureHandlerRootHOC(App));
应用程序.js
第一行为 -import 'react-native-gesture-handler';