![](/img/trans.png)
[英]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.