Search code examples
iosobjective-cuipageviewcontrolleruipagecontrol

Change transparency of dots in a UIPageViewController


I have a UIPageViewController with a transparent background and I'm wondering if I can make the non-selected page dots opaque. They're current translucent and I can see my background through them.

Is this possible?


Solution

  • I haven't tried it, but there's a pageIndicatorTintColor and currentPageIndicatorTintColor, both of which take a UIColor where you can probably set the alpha. Although the docs warn:

    No alpha is applied to this property for you. It is recommended (but not required) that the color you specify for this parameter contains some transparency–i.e. the alpha value should be less than 1.0.