[英]UINavigationBar title colour for VCs in a navigation stack doesn't change when back button is clicked
[英]Change colour of Back Button, Navigation Title in UIPopoverController
我已經在UIPopoverController
的contentView中添加了UIActivityViewController
。 並嘗試打開在UIPopoverController
本身中導航的Print
Option。 我明白了
我得到的是標題(打印選項/打印機)的顏色,后退按鈕是白色,我希望它是UIPopoverController
。僅在UIPopoverController
情況下。 否則,al很好。
請建議!
對於標題使用:
[self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor blueColor]}];
對於后退按鈕的箭頭和文本 :
[self.navigationController.navigationBar setTintColor:[UIColor blueColor]];
當然,如果您有UIPopoverController對象,則必須從導航欄中應用樣式:
popoverController.navigationBar.titleTextAttributes = self.navigationController.navigationBar.titleTextAttributes;
在該控制器的viewDidLoad方法中:
for (UIView *subview in self.navigationController.navigationBar.subviews) [subview setTintColor:[UIColor blueColor]];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.