[英]Change colour of Back Button, Navigation Title in UIPopoverController
I have added the UIActivityViewController
in the contentView of UIPopoverController
. 我已经在
UIPopoverController
的contentView中添加了UIActivityViewController
。 And trying to open Print
Option which is navigating in UIPopoverController
itself. 并尝试打开在
UIPopoverController
本身中导航的Print
Option。 I am getting that view 我明白了
And I am getting the color of Title (Print Options / Printer) and back button is white , I want it to blue.this is only in case of UIPopoverController
. 我得到的是标题(打印选项/打印机)的颜色,后退按钮是白色,我希望它是
UIPopoverController
。仅在UIPopoverController
情况下。 Otherwise al is fine. 否则,al很好。
Please suggest !!! 请建议!
For the Title use: 对于标题使用:
[self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor blueColor]}];
For the arrow and text of back button: 对于后退按钮的箭头和文本 :
[self.navigationController.navigationBar setTintColor:[UIColor blueColor]];
And of course if you have an object of UIPopoverController you have to apply the styles from navigation bar: 当然,如果您有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.