Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 导航栏在滑动和滚动时隐藏_Ios_Swift - Fatal编程技术网

Ios 导航栏在滑动和滚动时隐藏

Ios 导航栏在滑动和滚动时隐藏,ios,swift,Ios,Swift,我在swift中以这种方式定制导航栏 navigationItem.title = "SUPPORT" let menuButton = UIBarButtonItem(image: UIImage(named: "menuIcon"), style: UIBarButtonItemStyle.Plain, target: self, action: "showMenu:") navigationItem.rightBarButtonItem = menuButton s

我在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)

我正在自定义所有视图控制器和表视图控制器中的导航项。我的问题是,当我在任何视图控制器中滑动或在表视图控制器中滚动时,导航隐藏。如何修复滑动和滚动时隐藏的导航条意味着它不应该每次都隐藏。

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

self.navigationController?.hidesBarsOnSwipe = false