繁体   English   中英

在UIPopoverController中更改后退按钮,导航标题的颜色

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM