How to change the colour of the UIPageControl when used in ios 5 simulator

vinay picture vinay · Jan 31, 2013 · Viewed 13k times · Source

I am using the following code in my application :-

In .h file

@property (strong, nonatomic) IBOutlet UIPageControl *pageControl;

and in .m file

pageControl.currentPage = counting;

counting is NSInteger. The application works fine but the UIPageControl is set to default white colour and I cant change the colour through attributes inspector could any one help?...

Answer

Ben Wheeler picture Ben Wheeler · Aug 18, 2013

In ios 6, you can just do:

pageControl.pageIndicatorTintColor = [UIColor blueColor];
pageControl.currentPageIndicatorTintColor = [UIColor greenColor];