iOS Development-ui Learning-uipagecontrol (page number Controller) use

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.