UIPageControl
技术博客http://www.cnblogs.com/ChenYilong/ 新浪微博http://weibo.com/luohanchenyilong 
numberOfPages // 设置有多少页 默认为0
// 2) 设置页数
[pageControl
 setNumberOfPages:kImageCount];
currentPage // 设置当前页
[pageControl setCurrentPage:0];

pageIndicatorTintColor // 设置页码指示器颜色
[pageControl setPageIndicatorTintColor:[UIColor blackColor]];
currentPageIndicatorTintColor // 设置当前页码指示器颜色

[pageControl setCurrentPageIndicatorTintColor:[UIColor redColor]];

添加分页控件的监听事件(监听值改变事件)
[pageControl
 addTarget:self action:@selector(pageChanged:)forControlEvents:UIControlEventValueChanged];

效果:
UIPageControl
 
© chenyilong. Powered by Postach.io

相关文章:

  • 2022-12-23
  • 2021-09-14
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
相关资源
相似解决方案