導(dǎo)航欄的一些全局配置

[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(NSIntegerMin, NSIntegerMin) forBarMetrics:UIBarMetricsDefault];//清空返回按鈕顯示上一級標(biāo)題,導(dǎo)致側(cè)滑時(shí)出現(xiàn)標(biāo)題顯示錯(cuò)亂

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];//狀態(tài)欄背景顏色配置

//導(dǎo)航欄全透明

self.navigationController.navigationBar.translucent = NO;

[self.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];

self.navigationController.navigationBar.shadowImage = [UIImage new];

//隱藏導(dǎo)航欄,push出現(xiàn)黑色陰影解決

[self.navigationController setNavigationBarHidden:YES animated:YES];//在viewWillAppear中使用

[self.navigationController setNavigationBarHidden:NO animated:NO];//在viewWillDisappear中使用

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

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