Swift 5.7 | What's new in UIPageControl ?

The Blue Prototype
3 min readJun 28, 2022
Photo by Bradyn Trollip on Unsplash

Get Started

Before looking into the new updates of WWDC22, it’s very important to know the few updates from WWDC20 about UIPageControl. So lets see few updates of UIPageControl from WWDC20:

Set background style of UIPageControl

/*
The preferred background style. Default is UIPageControlBackgroundStyleAutomatic on iOS, and UIPageControlBackgroundStyleProminent on tvOS.
*/
var backgroundStyle: UIPageControl.BackgroundStyle

Set indicator image for all pages of UIPageControl

/*
The preferred image for indicators. Symbol images are recommended. Default is nil.
*/
var preferredIndicatorImage: UIImage?

Get indicator image for UIPageControl’s specific page

/*
Returns the override indicator image for the specific page, nil if no override image was set.
Page must be in the range of 0..numberOfPages
*/
func indicatorImage(forPage page: Int) -> UIImage?

Set indicator image for UIPageControl’s specific page

/*
Override the indicator image for a specific page. Symbol images…

--

--

Responses (1)