Increase the size of the indicator in UIPageViewController’s UIPageControl

Scaling the page control will scale the dots, but will also scale the spacing in between them. pageControl.transform = CGAffineTransform(scaleX: 2, y: 2) If you want to keep the same spacing between dots, you’ll need to transform the dots individually: pageControl.subviews.forEach { $0.transform = CGAffineTransform(scaleX: 2, y: 2) } However, if you do this in … Read more

How to put the UIPageControl element on top of the sliding pages within a UIPageViewController?

I didn’t have the rep to comment on the answer that originated this, but I really like it. I improved the code and converted it to swift for the below subclass of UIPageViewController: class UIPageViewControllerWithOverlayIndicator: UIPageViewController { override func viewDidLayoutSubviews() { for subView in self.view.subviews as! [UIView] { if subView is UIScrollView { subView.frame = … Read more

How to create a Scroll View with a page control using swift? [closed]

import UIKit class DummyVC: UIViewController, UIScrollViewDelegate { let scrollView = UIScrollView(frame: CGRect(x:0, y:0, width:320,height: 300)) var colors:[UIColor] = [UIColor.red, UIColor.blue, UIColor.green, UIColor.yellow] var frame: CGRect = CGRect(x:0, y:0, width:0, height:0) var pageControl : UIPageControl = UIPageControl(frame: CGRect(x:50,y: 300, width:200, height:50)) override func viewDidLoad() { super.viewDidLoad() configurePageControl() scrollView.delegate = self scrollView.isPagingEnabled = true self.view.addSubview(scrollView) for index … Read more

Is there a way to change page indicator dots color

We customized the UIPageControl to use a custom image for the page indicator, I have listed the guts of the class below… GrayPageControl.h @interface GrayPageControl : UIPageControl { UIImage* activeImage; UIImage* inactiveImage; } GrayPageControl.m -(id) initWithCoder:(NSCoder *)aDecoder { self = [super initWithCoder:aDecoder]; activeImage = [[UIImage imageNamed:@”active_page_image.png”] retain]; inactiveImage = [[UIImage imageNamed:@”inactive_page_image.png”] retain]; return self; } … Read more

How can I change the color of pagination dots of UIPageControl?

UPDATE: This answer is 6 years old and very outdated, but it’s still attracting votes and comments. Ever since iOS 6.0 you should be using the pageIndicatorTintColor and currentPageIndicatorTintColor properties on UIPageControl. ORIGINAL ANSWER: I ran into this problem today and decided to write my own simple replacement class. It’s a sublassed UIView that uses … Read more