每当我滑动page controller,同时在滑动的相反方向点击底部的UIPageControl
,当前显示的页面和pageControl中的页码将不同步。
有没有人遇到过这个奇怪的问题并解决了?
如果您需要任何其他信息,请告诉我。
最佳答案
刚刚查看了 UIPageControl
的文档。我自己从未意识到这一点,但您可以使用页面控件进行输入:
When a user taps a page control to move to the next or previous page, the control sends the UIControlEventValueChanged event for handling by the delegate. The delegate can then evaluate the currentPage property to determine the page to display. The page control advances only one page in either direction.
我的建议是禁用页面控件或更新您的应用程序以响应其上的输入。在我的页面控件上将 userInteractionEnabled
设置为 false
解决了我的问题。
关于iOS UIPageViewController 页面控件不同步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36500447/