FSPagerView
FSPagerView copied to clipboard
Is there any solution to use both features of willDisplayCell and pagerViewWillEndDragging?
Hi, guys. I implemented my page control with automaticSlidingInterval
and it automatically changes currentPage
of page control when it shows different page.
It looks fine when I scroll only same direction but I scroll reversely, It jumps more than one index in page control (index
of willDisplay
method).
If I use only pagerViewWillEndDragging
then It works fine at dragging but, It doesn't work during the auto-scrolling.
Following code is my implementation of FSPageViewDelegate
, I want to take both features...
Is there any solution to resolve this issue? Thank you :)
func pagerView(
_ pagerView: FSPagerView,
willDisplay cell: FSPagerViewCell,
forItemAt index: Int)
{
self.pageControl.currentPage = index
}
func pagerViewWillEndDragging(
_ pagerView: FSPagerView,
targetIndex: Int)
{
self.pageControl.currentPage = targetIndex
}
+1