iphone - Is there a way to change page indicator dots color -
I am a newbie for iphone programming, I am trying to develop an app that uses page control. The background color of my scene is white and the page controller default is also white, which in turn controls the page control disappears, so I changed the back ground color of the page control so that it can be visible. Now, the scene patch looks bad and is there a way to change the dots color for page control?
Thank you in advance
We used UIPageControl for a custom image for the page indicator Optimized to use, I have listed the courage of the class given below ...
GrayPageControl.h
@Interface Grayz control: UIPEZ control ( UIImage * activeImage; UIImage * Inactive Image;}
Grazage control.M
- (id) with that codec: (Encoder *) Adicoder {Self- [Super Init With Codec: ADCoder]; ActiveIma Ge = [[UIImage imageNamed: @ "active_page_image.png"] Retention]; Passive Image = [[UIImage imageNamed: @ "inactive_page_image.png"] Retained]; Self return;} - (Zero) Update for Dots { (Int i = 0; I & lt; [Self-aviation count]; I ++) {UIImageView * dot = [Self-Symfuse ObjectAddindex: I]; if (i == self.currentPage) dot.image = activeImage; Else dot .image = passive image;}} - (zero) set current page: (NSINGR) page {[super setset page: page]; [Self update dots]; }
Then in Visual Controller we use it like normal UIPageControl
IBOutlet GrayPageControl * PageIndicator; Edit: I have the IBAction in the GePase control view controller which is a greyage control. Value is linked to the event.
- changed the (IBAction) page: (ID) from sender {int page = pageindicator. CurrentPage; // Update the scroll view on the appropriate page; CGTT frame = picturecrawler.fr; Frame.origin.x = frame.size.width * Page; Frame.origin.y = 0; [Imagecroller Scrolltequibable: Frame Animated: Yes]; }