The Uipagecontrol is the page number controller, is in the flip picture reading the following several small points, the property set as follows;
1Uipagecontrol *pagecontrol = [[Uipagecontrol alloc]initwithframe:cgrectmake (0, -, Self.view.frame.size.width, -)];2 //Set Background color3Pagecontrol.backgroundcolor =[Uicolor Graycolor];4 //set the current page5Pagecontrol.currentpage =0;6 //Set Total pages7Pagecontrol.numberofpages = -;8 //sets the color of the dot display for the current page9Pagecontrol.currentpageindicatortintcolor =[Uicolor Redcolor];Ten //sets the color of other non-current page dots OnePagecontrol.pageindicatortintcolor =[Uicolor Bluecolor]; A //Add Event - [Pagecontrol addtarget:self action: @selector (haha:) forcontrolevents:uicontroleventtouchupinside]; - the //Add to Current View -[Self.view Addsubview:pagecontrol];
You can also add events to him as follows:
1 -(void) haha: (ID) sender{2 ; 3 }
iOS Development-ui Learning-uipagecontrol (page number Controller) use