iOS UIPageControl 的一个小Bug

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xjh093/article/details/86721532

示例

_pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 15)];
_pageControl.numberOfPages = _pageCount;
_pageControl.hidesForSinglePage = YES;
[_pageControl addTarget:self action:@selector(pageControlNumberChanged:) forControlEvents:UIControlEventValueChanged];

_pageCount 设置为 2 时,
点击 _pageControl,
方法 pageControlNumberChanged:内,
所获取到的pageControl.currentPage,
会在 01 之间来回切换。

当设置的数值大于 2 时,
则不会有这种情况。


一行代码搞定视图圆角

https://github.com/xjh093/JHViewCorner


猜你喜欢

转载自blog.csdn.net/xjh093/article/details/86721532