設(shè)置一張透明的背景圖片讓導(dǎo)航欄透明
//設(shè)置背景圖
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"blank"] forBarMetrics:UIBarMetricsDefault];
//通過(guò)設(shè)置shadowImage移除黑線
[self.navigationController.navigationBar.shadowImage = [UIImage new];
//設(shè)置標(biāo)題字體大小與顏色
[self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:19],NSForegroundColorAttributeName:[UIColor whiteColor]}];
//設(shè)置返回按鈕字體顏色
[self.navigationController.navigationBar setTintColor:[UIColor whiteColor]];
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者