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

iCarousel and deadzone #842

Open Malenea opened 6 years ago

Malenea commented 6 years ago

Hey there,

Just started a project using iCarousel and searched across the web for an answer I couldn't find. When implementing iCarousel it uses the created view for gesture recognizer. i.e : Creating a carousel this way: let carousel = iCarousel(frame: CGRect(x: 0, y: 0, width: 200, height: 200)) will create a 200 x 200 square that will recognize gesture's swipes.

The problem is that my carousel is on top of a collection view and I wanted to recognize gestures from the collectionView that are not corresponding to a carousel's cell, meaning i wanted to be able to go through the carousel's view if ever there's no cell to swipe the collection view up and down and if ever there was a cell use the recognizers of the carousel (left and right).

On a UIView, that would mean override the function point(inside point: CGPoint, with event: UIEvent?) -> Bool or so did I read during my researches of a solution. Is there a similar way for the iCarousel, so I can use the cells to swipe through the carousel and make the rest "transparent"-like?