There is a UIPageViewController with three pages. Each page is a different color ( backgroundColor ). On each page pageControl should be a different color. At the moment, the color changes when scrolling when the pageControl.currentPage changes.

 pageControl?.pageIndicatorTintColor = ... pageControl?.currentPageIndicatorTintColor = ... 

The question is, is it possible to change the color gradually? That is, if the user slowly scrolls the view, the "point" is painted gradually. The example in the picture, the screen is blue, then switches to pink. And that part of the "point", which already on a pink background should be a different color.

enter image description here

  • dig up a point in the hierarchy view and use your hands to do what you want - Max Mikheyenko
  • can i have code example - Vitali Eller
  • This is the effect you need to get: github.com/donnellyk/KVNMaskedPageControl - Vitali Eller
  • one
    why not use this same code? - Max Mikheyenko
  • need to swift =) - Vitali Eller Nov.

1 answer 1

Well, if you are too lazy to rewrite with your hands, what Max Mikheyenko suggested, you can create a custom UIView with 3 points and further on each of PageView set the desired color to the desired point :)