UIPageControl + UIAppearance
Asked Answered
S

1

4

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

Sympathin answered 26/3, 2012 at 22:56 Comment(3)
The release notes seem to have enough info to get started: developer.apple.com/library/ios/#releasenotes/General/… A key point seems to be to check the headers for UI_APPEARANCE_SELECTOR ("Marks a method that participates in the appearance proxy API.")Aikens
I don't think UIPageControl adopts the UIAppearance protocol. Page controls are relatively trivial to implement; you will probably have to make your own or find an open source one. Like github.com/honcheng/iOS-StyledPageControl.Aikens
Just an update for anyone reading this, UIPageControl will support the UIAppearance protocol in iOS 6.Sympathin
L
8

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;
Landgravine answered 5/12, 2012 at 0:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.