Changing UIPageViewController own PageController regarding Color of Dots

前端 未结 3 690
梦毁少年i
梦毁少年i 2021-02-04 00:40

Hey I\'m using a UIPageViewController to control what page I am on and for scrolling. I know it\'s possible to show a Page Controller along with it by simply adding the followin

3条回答
  •  走了就别回头了
    2021-02-04 01:43

    If you would like to change the UIPageControl's colors for a specific UIPageViewController, you can use the following:

    In Swift 3

    let pageControl: UIPageControl = UIPageControl.appearance(whenContainedInInstancesOf: [MyPageViewController.self])
    pageControl.pageIndicatorTintColor = UIColor.green
    // ... any other changes to pageControl
    

提交回复
热议问题