如何自定义/设计一个 UIPopoverController [英] How to customize / style a UIPopoverController

查看:24
本文介绍了如何自定义/设计一个 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..

这可能吗?

问候,托马斯

推荐答案

iOS 5.0 开始,通过继承抽象类 UIPopoverBackgroundView 和将您的子类分配给 popoverBackgroundViewClass 属性在您的 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆