Search code examples
objective-cios5xcode4.5uipagecontrol

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


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?...


Solution

  • In ios 6, you can just do:

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