Unwanted double navigation bar

后端 未结 1 858
南笙
南笙 2021-01-18 05:12

I made the navigation bar (top bar) appear/disappear when I tap the screen, and also lay on top of the background image. It worked, but with one problem: I\'ve suddenly got

相关标签:
1条回答
  • 2021-01-18 06:08

    Usually, a recurring navigation bar like you describe is caused by something like pushing the same view controller twice. Can you check to ensure you're only pushing a single view controller on to your navigation stack (via breakpoints or logging?). Is it possible that winesDetailViewController is already on the navigation stack? You can also try logging the value of self.navigationController.viewControllers for a hint.

    I would also suggest moving

    self.navigationController.navigationBar.translucent = YES;
    

    to viewWillAppear and

    self.wantsFullScreenLayout = YES;
    

    to your initializer (though I don't think this will solve your problem).

    0 讨论(0)
提交回复
热议问题