ealeksandrov/EAIntroView

Partially swiping then pressing on page control causes unintended behavior

babramovitch opened this issue · 2 comments

You can get unintended behavior in the following two scenarios

  1. Begin swiping a page left/right and without removing your swipe finger click on the bottom left/right of the page control. It will action the click and when you remove your swipe finger it stutters around.

  2. Press on the left/right of the bottom page control but don't remove your finger. Begin swiping and then remove your finger. It stutters around as well.

Not the biggest of issues, but we were worried about people unintentionally triggering the problem.

We solved it by removing/adding the selector when page scrolling begins. We tried disabling user interactions, but in scenario 2 you could still trigger the bug when you lifted your finger.

- (void)intro:(EAIntroView *)introView pageStartScrolling:(EAIntroPage *)page withIndex:(NSUInteger)pageIndex {
    [_intro.pageControl removeTarget:nil action:NULL forControlEvents:UIControlEventValueChanged];
}

- (void)intro:(EAIntroView *)introView pageEndScrolling:(EAIntroPage *)page withIndex:(NSUInteger)pageIndex {
    [_intro.pageControl addTarget:_intro action:@selector(showPanelAtPageControl) forControlEvents:UIControlEventValueChanged];
}

Thanks, confirmed bug and your solution works well!
Adding it to the library.

Actually I found way to prevent it without additional actions in UIScrollView delegate (which will fire on every scroll) - check out 3e62341.
Still thanks for your suggestion and bringing it to my attention :)