我想在显示模式窗口时隐藏状态栏。
我的设置如下,但它不会按预期工作:
<StatusBar animated={true} hidden={true} translucent={true}>
使用statusBar半透明
如果你的状态栏是translucent
,你可以设置statusBarTranslucent
to the modal
.
自添加以来React Native 0.62
<Modal {...props} statusBarTranslucent>...</Modal>
Credit: https://github.com/react-native-modal/react-native-modal/issues/50#issuecomment-607535322 https://github.com/react-native-modal/react-native-modal/issues/50#issuecomment-607535322
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)