如何自定义/样式UIPopoverController [英] How to customize / style a UIPopoverController
问题描述
我正在使用iPad应用程序,我正在使用UIPopoverControllers。我在应用程序需要品牌和样式的部分,我想知道如何更改UIPopoverController的颜色/色调?标准是深蓝色,但它需要是另一种颜色..
I'm working on an iPad application and I'm using UIPopoverControllers. I'm at the part where the app needs to be branded and styled and i'm wondering how to change the color / tint of the UIPopoverController? Standard is dark blue but it needs to be another color..
这是可能吗?
Greets,Thomas
Greets, Thomas
推荐答案
这是可能,从 iOS 5.0 类别 UIPopoverBackgroundView
,并将您的子类分配给 popoverBackgroundViewClass
/library/ios/#documentation/uikit/reference/UIPopoverController_class/Reference/Reference.html> UIPopoverController
实例。遗憾的是没有 tintColor
属性,因为popover需要使用图像的箭头和边框,以便在动态调整大小时实现平滑的动画。您可以在 UIPopoverBackgroundView类参考
This is possible starting in iOS 5.0 by subclassing the abstract class UIPopoverBackgroundView
and assigning your subclass to the popoverBackgroundViewClass
property on your UIPopoverController
instance. Unfortunately there is no tintColor
property as the popover needs to use images for it's arrow and border in order to achieve smooth animations during dynamic resizing. You can learn more about how to customize the appearance of a UIPopoverController in the UIPopoverBackgroundView Class Reference
这篇关于如何自定义/样式UIPopoverController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!