iOS—PageViewController循环切换界面问题

来源:互联网 发布:网络平台推广合同范本 编辑:程序博客网 时间:2024/05/18 13:24


本篇文章是小编的个人见解,欢迎指正。


在iOS开发中,我们经常会遇到这样的问题:界面顶部视图是几张图片的轮播。。


参考下面的代码,只是解决的办法之一,更多的解决方案,欢迎探索!


-(void)pageControlTouched:(UIPageControl *)onePageControl{if(onePageControl.currentPage == 0 && _currentPage == 0){oneControlPage.currentPage = onePageControl.numberOfPages - 1;}else if(_currentPage ==6 && onePageControl.currentPage == 6){onePageControl.currentPage = 0;}_currentPage = onePageControl.currentPage;}


0 0