I want to add border color for dots in UIPageControl. Here is the small picture of it:
I am able to put second dot by configuring it from XCode but I cannot make the first and third circles' inside empty. Is there a simple way to achieve that?
Thanks :)
Luke Rogers's solution, written in objective-c:
Edited- Swift 3 & 4 extension to achieve the same result-
to use it write below code in viewDidLoad() or viewDidAppear()
In Objective-C use below code-
Output-
Swift 5 version
Swift 4. You can assign borderColor and then observe currentPage property to change dots' border:
SWIFT 3 Version from @RiosK
That is not possible with the current properties available for
UIPageControl
. But you can do by integrating any third party page control which mimic the functionality of iOSUIPageControl
.Other answer has applied a patch. I highly disagreed with that solution.