简体   繁体   English

导航栏隐藏在滑动和滚动状态

[英]Navigation bar is hiding on swipe and scroll

I am customising navigation bar this way in swift 我正在以这种方式快速自定义导航栏

navigationItem.title = "SUPPORT"            
let menuButton = UIBarButtonItem(image: UIImage(named: "menuIcon"), style: UIBarButtonItemStyle.Plain, target: self, action: "showMenu:")
navigationItem.rightBarButtonItem = menuButton
self.navigationItem.setHidesBackButton(true, animated:false)

I am customising navigation item in all view controller and table view controller. 我正在所有视图控制器和表视图控制器中自定义导航项。 My problem is navigation is hiding when I swipe in any view controller or scroll in table view controller. 我的问题是,当我在任何视图控制器中滑动或在表视图控制器中滚动时,导航隐藏了。 How to fix navigation bar being hidden on swipe and scroll means it should not be hidden everytime. 如何解决导航栏在滑动和滚动时隐藏的问题,这意味着它不应每次都隐藏。

将此添加到(导航控制器的)根视图控制器中

self.navigationController?.hidesBarsOnSwipe = false

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM