iOS 改變導(dǎo)航欄返回按鈕以及導(dǎo)航字體顏色

#pragma mark - 導(dǎo)航欄基本設(shè)置

- (void)setupUI{

/* 1.設(shè)置導(dǎo)航欄顏色 */

UINavigationBar *navigationBar = [UINavigationBar appearance];

//[navigationBar setBarTintColor:XXYColor(59.0, 69.0, 98.0, 1.0)];

//

/* 2.設(shè)置導(dǎo)航條顏色 */

[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"navitationbar"] forBarMetrics:UIBarMetricsDefault];

//self.navigationController.navigationBar.barTintColor = [UIColor blackColor];

/* 3.改變導(dǎo)航欄返回按鈕顏色*/

self.navigationController.navigationBar.tintColor = [UIColor whiteColor];

/* 4.設(shè)置導(dǎo)航條標(biāo)題字體顏色以及大小*/

[navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:18], NSForegroundColorAttributeName:[UIColor whiteColor]}];

}

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

推薦閱讀更多精彩內(nèi)容