iOS 隐藏/显示导航栏

一、隐藏导航栏

[self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:[UIImage
new]];

二、显示导航栏

[self.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:nil];

 

转载于:https://www.cnblogs.com/xsphehe/p/5959434.html

你可能感兴趣的:(iOS 隐藏/显示导航栏)