nicklockwood / iCarousel

A simple, highly customisable, data-driven 3D carousel for iOS and Mac OS
http://www.charcoaldesign.co.uk/source/cocoa#icarousel
Other
12k stars 2.58k forks source link

Cylinder Carousel scrolls wrong way on swipes near edge #250

Closed ksmoran closed 12 years ago

ksmoran commented 12 years ago

I'm having an annoying issue where when the user is swiping the carousel left and right near the edges of the iPad, the carousel scrolls by 'one' in the wrong way. It happens most often on shorter flicks on either side of the screen where it clearly scrolls the wrong way.

nicklockwood commented 12 years ago

If there is a gap between your carousel items, it's possible that this is happening because the user is accidentally tapping one of the rear-side views when they swipe. Try disabling centerItemWhenSelected and see if that helps.

ksmoran commented 12 years ago

Disabling that means that when tapping or swiping on the carousel, the selected item won't lock into the center right? I need it to be centered and locked on the screen if the user swipes to it. If this is true, then I'll just ignore the problem and you can close this issue. thanks!

nicklockwood commented 12 years ago

No, you're thinking of the scrollToItemBoundary property. The centerItemWhenSelected property means that when you tap on a view it automatically scrolls to the centre. I suspect that it may be reading your swipes as taps, causing the carousel to appear to scroll the wrong way.

If disabling the property doesn't help, turn it back on. If it does help, but you still want that feature, you can re-implement it easily enough using the delegate, but add your own delay logic to prevent false tap detection.

ksmoran commented 12 years ago

Oh gotcha. OK thanks. I do need it tappable so I'll just implement my own tapping method.