If you add pageControl on a white background, it will not be visible. Add a time line to make sure it is.
pageControl.layer.borderWidth = 0.5;
If it is, adjust the color of the shades.
pageControl.pageIndicatorTintColor = UIColor.grayColor();
pageControl.currentPageIndicatorTintColor = UIColor.blackColor();
If not, you are probably doing something wrong, it should be something like this:
var pageControl = UIPageControl(frame: CGRectMake(135, 230, 50, 20))
pageControl.numberOfPages = 2;
pageControl.currentPage = 0;
pageControl.pageIndicatorTintColor = UIColor.grayColor();
pageControl.currentPageIndicatorTintColor = UIColor.greenColor();
self.view.addSubview(pageControl);
Of course, you also need to associate it with the corresponding scrollView / pageView
grep source
share