設(shè)置導(dǎo)航欄某個(gè)界面的導(dǎo)航欄透明 ?(導(dǎo)航按鈕顯示)
在viewWillAppear里面加兩行代碼
//設(shè)置導(dǎo)航欄背景圖片為一個(gè)空的image蚣录,這樣就透明了
[self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
//去掉透明后導(dǎo)航欄下邊的黑邊
[self.navigationController.navigationBar setShadowImage:[[UIImage alloc] init]];
如果不想讓其他頁(yè)面的導(dǎo)航欄變?yōu)橥该?/p>
在viewWillDisappear里面重置一下
[self.navigationController.navigationBar setBackgroundImage:nil forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setShadowImage:nil];