Class

UIPageControl

A control that displays a horizontal series of dots, each of which corresponds to a page in the app’s document or other data-model entity.

Declaration

@interface UIPageControl : UIControl

Overview

For an example of a page control, see the Weather app when it's configured to display information for more than one location.

When a user taps a page control to move to the next or previous page, the control sends the UIControlEventValueChanged event for handling by the delegate. The delegate can then evaluate the currentPage property to determine the page to display. The page control advances only one page in either direction. The currently viewed page is indicated by a white dot. Depending on the device, a certain number of dots are displayed on the screen before they are clipped.

Topics

Managing the Page Navigation

currentPage

The current page, shown by the receiver as a white dot.

numberOfPages

The number of pages the receiver shows (as dots).

hidesForSinglePage

A Boolean value that controls whether the page control is hidden when there is only one page.

Updating the Page Display

pageIndicatorTintColor

The tint color to be used for the page indicator.

currentPageIndicatorTintColor

The tint color to be used for the current page indicator.

defersCurrentPageDisplay

A Boolean value that controls when the current page is displayed.

- updateCurrentPageDisplay

Updates the page indicator to the current page.

Resizing the Control

- sizeForNumberOfPages:

Returns the size the receiver’s bounds should be to accommodate the given number of pages.

Relationships

Inherits From

See Also

Controls

UIControl

The base class for controls, which are visual elements that convey a specific action or intention in response to user interactions.

UIButton

A control that executes your custom code in response to user interactions.

UIDatePicker

A control used for the inputting of date and time values.

UISegmentedControl

A horizontal control made of multiple segments, each segment functioning as a discrete button.

UISlider

A control used to select a single value from a continuous range of values.

UIStepper

A control used to increment or decrement a value.

UISwitch

A control that offers a binary choice, such as On/Off.