📌  相关文章
📜  反应原生导航删除顶部标题屏幕 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:04:06.344000             🧑  作者: Mango

代码示例1
// This using the @react-navigation/material-top-tabs from the
// stackoverflow source...
export default class Login extends Component {
    static navigationOptions = {
        header: null
    }
}
// Didn't work for me but it did give me a clue. I ended up
// setting the header to return a basically a blank
setTimeout(() => {
    navigation.setOptions({
      header: () => (
        
          
            .
          
        
      )
    });
  }, 1);
// Note: in iOS sumulation, I had to tweak the initial fontSize
// to get it to not show on reload... Hence the addition of the
// setTimeout. Yes there is a blink, but now at least I don't
// have to do the tweak to start with. Not sure if this really
// works on an iOS device. Don't have a real one to test on.