UIPageControl *pageControl = [[UIPageControl alloc] init];
    pageControl.center  = CGPointMake(w * 0.5, h - 20);
    pageControl.bounds = CGRectMake(0, 0, 150, 50);
   
    // 一共显示多少个圆点(多少页)
    pageControl.numberOfPages = 4;
   
    // 设置非选中页的圆点颜色
    pageControl.pageIndicatorTintColor = [UIColor redColor];
    
    // 设置选中页的圆点颜色
    pageControl.currentPageIndicatorTintColor = [UIColor blueColor];
    
    // 禁止点击功能
    pageControl.enabled = NO;

相关文章:

  • 2021-12-17
  • 2021-11-18
  • 2021-12-03
  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
  • 2022-03-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2022-01-15
  • 2022-01-16
相关资源
相似解决方案