Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以仅水平使用反应原生 SafeAreaView ( react-native-safe-area-context)(或删除生成的顶部填充)?例如,在从底部滑动的模式中使用它时,iPhone X 间距会添加到顶部,尽管它实际上离屏幕顶部很远。它应该只在横向的左右添加必要的间距。
react-native-safe-area-context
使用edges道具对你有用吗?
edges
<SafeAreaView edges={['left', 'right']} />
bottom如果您只想从顶部删除它,您可以添加到上面的数组中。
bottom