Scrollable Page Control - admiral-team/admiralui-ios GitHub Wiki

Class

An element displays a row of indicator ellipses, each of which represents a page in a flat list.


Declaration

public class ScrollablePageControl: UIView, AppThemeable

Overview

The scrolling row of indicators helps people navigate the list to find the page they want. Page controls can handle an arbitrary number of pages, making them particularly useful in situations where people can create custom lists. Page controls appear as a series of indicator ellipse by default, representing the available pages. A solid ellipse denotes the current page. Visually, these ellipses are always equidistant, and are clipped if too many appear onscreen.

Live example

Configure a ScrollablePageControl

Configuration a ScrollablePageControl with five indicators and first current page.

let pageControl = ScrollablePageControl()
pageControl.numberOfPages = 5
pageControl.setCurrentPage(at: 0)

For change current page with animation in ScrollablePageControl, you can use public function setCurrentPage

pageControl.setCurrentPage(at: 1, animated: true)

Contribution

You can help us to find bugs or ask us to add features.

  • To start issue please use ready-made templates.
  • To make changes to the repository, you need to create a fork of the project, make changes to the code and create a pull request in our project. You can read more about this in the Github documentation.