AndreiMisiukevich / CardView

CardsView | CarouselView | CoverflowView | CubeView for Xamarin.Forms
MIT License
710 stars 114 forks source link

[iOS] IsPanInteractionEnabled interaction not honored when SelectedIndex binding added #401

Closed InquisitorJax closed 2 years ago

InquisitorJax commented 2 years ago

When using SelectedIndex binding, and setting IsPanInteractionEnabled = false, the CarouselView is still picking up a swipe action and setting the SelectedIndex property, which triggers a pan. lockpan

The lock works as expected on android. lockpandroid

find attached repro CardsCarouselSample.zip

AndreiMisiukevich commented 2 years ago

Hi) Please use IsUserInteractionEnabled instead.

AndreiMisiukevich commented 2 years ago

Or try to set IsPanSwipeEnabled to False

InquisitorJax commented 2 years ago

Hey Andrei,

We need user interaction, as the reason we're locking the swipe is to allow other touch interactions in the content.

Setting IsPanSwipeEnabled=False still sets the SelectedIndex, which makes it swipe.

InquisitorJax commented 2 years ago

Actually - scratch that :)

using IsUserInteractionEnabled does the trick - both on iOS and Android :) It locks the pan, but still allows user touch events in the content.

Thanks!

AndreiMisiukevich commented 2 years ago

Great)