Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 421
vinay Avatar asked Jan 31 '13 09:01

vinay


2 Answers

In ios 6, you can just do:

pageControl.pageIndicatorTintColor = [UIColor blueColor];
pageControl.currentPageIndicatorTintColor = [UIColor greenColor];
like image 159
Ben Wheeler Avatar answered Nov 14 '22 04:11

Ben Wheeler


Similar as below.

How can i change the color of pagination dots of UIPageControl?

I think there is no property for page controller to change the dot color

like image 1
svrushal Avatar answered Nov 14 '22 03:11

svrushal