- (void)viewWillAppear:(BOOL)animated {
//設(shè)置導(dǎo)航欄背景圖片為一個(gè)空的image,這樣就透明了
[self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
//去掉透明后導(dǎo)航欄下邊的黑邊
[self.navigationController.navigationBar setShadowImage:[[UIImage alloc] init]];
}
- (void)viewWillDisappear:(BOOL)animated {
[self.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:nil];
}
只會(huì)消失當(dāng)前vc的導(dǎo)航條線條统抬,push的下個(gè)頁面沒有影響