//导航条透明化
UINavigationBar *bar=[UINavigationBar appearance];
bar.translucent=YES;//透明属性的设置
//同时背景色也要设置的要不然无法透明,直接new 一个就好了
[self.navigationController.navigationBar setBackgroundImage:[UIImage new]
forBarMetrics:UIBarMetricsDefault];
self.navigationController.navigationBar.shadowImage = [UIImage new];