wim_til
wim_til

Reputation: 150

UIPageView swipe on dots transition in wrong direction

I have a UIPageView controller with three view. Now the probleem is if you swipe over the view, the page scroll in the swipe direction. But if you swipe over the Page indictor dots the page scroll in the opposite direction of the swipe. Does anyone know how I can fix that?

Upvotes: 0

Views: 63

Answers (1)

Gerd Castan
Gerd Castan

Reputation: 6849

The page indicator does not recognize swipes, it recognizes only taps.

If you tap on the right side, the next page is shown.

If you tab on the left side, the previous page is shown.

iOS recognizes the tap position where you release your finger (not where you tap down).

So when you think you swipe to the right, you release your finger at the right side and this is recognized by iOS as a tap on the right side which shows the next page.

And vice versa.

Upvotes: 2

Related Questions