ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • UIPageControl / UIPageViewControl
    iOS/UICatalog 2022. 3. 16. 10:06

    In this tutorial, we’ll be discussing and implementing the UIPageControl element in our iOS Application.

    UIPageControl

    UIPageControl is inherited from UIControl. A UIPageControl displays horizontal dots with each dot corresponding to a different Page in the ViewController.

    A UIPageViewController is used to browse through different pages where each page is a Child View Controller.

     

     

    1. UIPageControl Properties & Functions
    • currentPage : The current page that is highlighted in the UIPageControl. This returns the index of the page.
    • numberOfPages : The number of pages displayed(equal to the number of dots).
    • hidesForSinglePage : A Boolean value to toggle the visibility of the PageControl on the current page.
    • pageIndicatorTintColor : The tint color that’s shown on the current page.
    • currentPageIndicatorTintColor : The tint color to be used for the current page indicator.
    • defersCurrentPageDisplay : A Bool value that controls when the current page is displayed.
    • updateCurrentPageDisplay() : Updates the page indicator property to the current page.

    When a user taps on the left of the UIPageControl, the user is taken to the previous page.
    When the user taps on the right of the UIPageControl, the user is taken to the next page.

     

    We can detect the clicks by creating an IBAction function from the Interface Builder or using Selectors and Targets programmatically. 

     

     

    'iOS > UICatalog' 카테고리의 다른 글

    UITabBarController, UICollectionView  (0) 2022.04.06
    UITextField, UITextFieldDelegate  (0) 2022.04.04
    UITableView  (0) 2022.04.03
    UIStackView  (0) 2022.04.03
    UIButton  (0) 2022.03.21

    댓글

Designed by Tistory.