PageIndicatorTintColor in UIPageControl remains transparent in iOS7

Does anyone have an idea why setting color in pageIndicatorTintColor in UIPageControl does not work in iOS7? Here is the line of code where I set this property (self - UIPageControl):

[self setPageIndicatorTintColor:[UIColor greenColor]];

I registered with the iOS Developer Library, and the description of this property is similar to what it was a few weeks ago. Could this be Apple's shortage? Any idea how to fix this? However, on iOS6 it still works great.

+4
source share
2 answers

The same problem fixed this by changing the order of the methods, first of all you need to set numberOfPages and only after that tintColor:

before:

UIPageControl *pageControl = [[UIPageControl alloc] initWithFrame: ...
pageControl.currentPageIndicatorTintColor = [UIColor blackColor];
pageControl.pageIndicatorTintColor = [UIColor grayColor];
pageControl.numberOfPages = 5;

Now:

UIPageControl *pageControl = [[UIPageControl alloc] initWithFrame: ...
pageControl.numberOfPages = 5;
pageControl.currentPageIndicatorTintColor = [UIColor blackColor];
pageControl.pageIndicatorTintColor = [UIColor grayColor];
+14

: UIPageControl 0,54 1.

0

All Articles