本文介绍了UIPageControl + UIAppearance的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

UIAppearance的文档非常差。

The docs for UIAppearance is extremely poor.

我想自定义UIPageController的颜色,但我无法确定要设置的属性。当我去 [UIPagecontrol外观]设置我可能有数百个选项,所以几乎不可能弄清楚它是什么。

I want to customize the colours for a UIPageController, but I am unable to figure out which properties to set. When I go [UIPagecontrol appearance] set I get probably hundreds of options, so it's nearly impossible to figure out what's what.

我认为可以使用UIAppearance代理,对吗?

I would assume it's possible with UIAppearance proxy, right?

谢谢

推荐答案

UIAppearance 协议已添加到 UIPageControl ,自iOS 6开始。

UIAppearance protocol was added to UIPageControl as of iOS 6.

您可以自定义的属性是:

The properties you can customise are:


  • 点色调

  • 突出显示的点色调颜色

这是 UIPageControl.h 的摘录,因为你可以看到这些 UIAppearance 只能在iOS 6上添加。

This is an excerpt from UIPageControl.h, as you can see these UIAppearance additions are only available from iOS 6.

@property(nonatomic,retain) UIColor *pageIndicatorTintColor NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
@property(nonatomic,retain) UIColor *currentPageIndicatorTintColor NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;

这篇关于UIPageControl + UIAppearance的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-13 05:54