更改UIPopoverController颜色(和后退button颜色)

我尝试从iOS 5上的UIPopoverControler中更改颜色。为此,我使用UIPopoverBackgroundView的子类,将其分配给我的popover,如下所示:

self.popover.popoverBackgroundViewClass = [KWPopoverBackgroundView class]; 

我的popover现在是黑色的,因为我在我的KWPopoverBackgroundView类中定义了,但是我的外观仍然有问题。 popup窗口中navigationController的后退button(奖牌)仍然是蓝色的。 我希望一切都以黑色统一。 我如何摆脱这种蓝色?

在这里输入图像说明

我试图改变我的navigationController.navigationBar tintColor,但当然popover并不在乎。 有没有办法在iOS 5.0中解决这个问题? (我的应用程序在AppStore上,我不想要一个丑陋的黑客来解决这个问题)谢谢。

好吧,我刚刚发现如何更改UIPopoverController内的UINavigationController后退button(或其他UIBarButtonItems)的色调颜色。

使用UIPopoverBackgroundView,您只能更改背景和箭头图像。 要改变其他物品的外观,你必须使用UIAppearance类似下面的东西。

 // Set the UIBarButtonItem(s) inside UIPopoverController class to dark gray [[UIBarButtonItem appearanceWhenContainedIn:[UIPopoverController class], nil] setTintColor:[UIColor colorWithWhite:0.1f alpha:1.0f]]; 

与黑后面按钮项目的黑popover