1、实例化
_pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(30, HEIGHT-30, WIDTH-30, 30)];
2、设置圆点个数
_pageControl.numberOfPages = 9;
3、设置默认选中
_pageControl.currentPage = 0;
4、设置选中前的圆点颜色
_pageControl.pageIndicatorTintColor = [UIColor cyanColor];
5、设置选中后的圆点颜色
_pageControl.currentPageIndicatorTintColor = [UIColor redColor];
6、添加操作
[_pageControl addTarget:self action:@selector(pageControlClick:) forControlEvents:UIControlEventValueChanged];