I\'m using a UIPageViewController
with Navigation set to Horizontal, Transition Style set to Scroll (in InterfaceBuilder), and no spine. Which gives me a lovely
You can access this for all PageControl objects by using appearance
(see the UIAppearance protocol), but to get a specific instance you'd have to use recursion. Swift code:
let pageControl = UIPageControl.appearance()
How about a nice, up to date Swift 1-liner?
let pageControl = view.subviews.first { $0 is UIPageControl } as? UIPageControl
Or if you like an extension:
extension UIPageViewController {
var pageControl: UIPageControl? {
return view.subviews.first { $0 is UIPageControl } as? UIPageControl
}
}