UIPageControl + UIAppearance

巧了我就是萌 提交于 2019-12-10 09:34:39

问题


The docs for UIAppearance is extremely poor.

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.

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

Thank you


回答1:


UIAppearance protocol was added to UIPageControl as of iOS 6.

The properties you can customise are:

  • Dot tint colour
  • Highlighted dot tint colour

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;


来源:https://stackoverflow.com/questions/9881088/uipagecontrol-uiappearance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!