I am using UIPageControl
and trying to make the background transparent.
UIPageControl *pageControl = [UIPageControl appearance];
pageControl.pageInd
Here is the answer with extension of Juan Ariza
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
let subViews: NSArray = view.subviews
var scrollView: UIScrollView? = nil
var pageControl: UIPageControl? = nil
for view in subViews {
if view.isKindOfClass(UIScrollView) {
scrollView = view as? UIScrollView
}
else if view.isKindOfClass(UIPageControl) {
pageControl = view as? UIPageControl
pageControl?.pageIndicatorTintColor = UIColor.lightGrayColor()
pageControl?.currentPageIndicatorTintColor = UIColor.blackColor()
pageControl?.backgroundColor = UIColor.clearColor()
}
}
if (scrollView != nil && pageControl != nil) {
scrollView?.frame = view.bounds
view.bringSubviewToFront(pageControl!)
}
}
Try this:
pageControl = [UIPageControl appearance];
//for change the bullets color
pageControl.pageIndicatorTintColor = [UIColor colorWithRed:(129.0/255) green:(129.0/255) blue:(129.0/255) alpha:1.0];
pageControl.currentPageIndicatorTintColor = [UIColor colorWithRed:(06.0/255) green:(122.0/255) blue:(145.0/255) alpha:1.0];
pageControl.backgroundColor = [UIColor clearColor];