Anyone has 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 is UIPageControl):
[self setPageIndicatorTintColor:[UIColor greenColor]];
I checked in iOS Developer Library and description of this property seems to be same as was few weeks ago. Can it be deficiency of the Apple? Any idea how to fix it? However on iOS6 still works fine.
Had the same problem, fixed this by changing an order of methods, first of all you need to set numberOfPages and only after that tintColor's:
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];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With