FSPagerView icon indicating copy to clipboard operation
FSPagerView copied to clipboard

Is there any solution to use both features of willDisplayCell and pagerViewWillEndDragging?

Open yojkim opened this issue 5 years ago • 1 comments

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
}

yojkim avatar Jun 21 '19 11:06 yojkim

+1

jhfkf avatar Jan 09 '20 08:01 jhfkf