The Uipagecontrol of ios-oc-basic control

Source: Internet
Author: User

Uipagecontrol (Page controller, which is the small dots on the desktop, each point represents an interface)

the parent class is Uicontrol.

iOS development commonly used in the basic controls, mainly with the Uiscrollview, the more commonly used is that some of the app's main page will have some pictures automatically converted, but also can be used for human conversion , this article is mainly to list the commonly used properties and methods (note Xcode version 7.2)


The properties are as follows:


@property (nonatomic) Nsinteger          numberofpages; //Total pages, default 0 pages

@property (nonatomic) Nsinteger            currentpage; //Current page, default is 0, value range is 0-Total page minus 1

@property (nonatomic) BOOL hidesforsinglepage; Sets whether the controller is automatically hidden when the total number of pages is 1 o'clock, the default is no


@property (nonatomic) BOOL deferscurrentpagedisplay; I set whether to defer automatic update of the current page number of the controller (default is NO)

Note: This property, if set to Yes, does not change the current page point displayed by the controller and must be manually called

-(void) updatecurrentpagedisplay;

This method is not updated.

@property (Nullable, Nonatomic,strong) Uicolor *pageindicatortintcolor Set the color of the controller page point

@property (nullable, nonatomic,strong) Uicolor *currentpageindicatortintcolor// Sets the color of the current page point of the controller, which must be 6.0 before it can be called


Method:


-(void) updatecurrentpagedisplay; // Update Controller Current page number


-(cgsize) sizefornumberofpages: ( Nsinteger  ) PageCount; //through the number of pages to get the controller size, mainly for the number of changes in the case of dynamic processing of size




This article is from the "Red Corner Antelope" blog, please be sure to keep this source http://2254359459.blog.51cto.com/10776102/1745447

The Uipagecontrol of ios-oc-basic control

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.