ZacharyKhan / ZKCarousel

A simple carousel implementation written in Swift
MIT License
289 stars 57 forks source link

GestureRecognizer Action #30

Closed cesarmtz93-wit closed 4 years ago

cesarmtz93-wit commented 4 years ago

By default it has the tap gesture that goes to the next image (slide) but is there a way in where i can change that action?

ZacharyKhan commented 4 years ago

Thank you for the suggestion. I will make the selector public and allow users to use their own function for the tap action. I'll reply here once I have pushed the updates.

cesarmtz93-wit commented 4 years ago

do you have an estimated date of this release?

ZacharyKhan commented 4 years ago

do you have an estimated date of this release?

@cesarmtz93-wit I can have it done by tonight, I apologize I’ve had a very busy week.

cesarmtz93-wit commented 4 years ago

Awesome, yeah any time this week or next week is fine, I was just wondering!

Thanks man!

ZacharyKhan commented 4 years ago

Awesome, yeah any time this week or next week is fine, I was just wondering! ...

@cesarmtz93-wit not a problem, it should only take about 20-30 minutes or so. I can take a stab this evening.

Also, just FYI there is a Stop() function on ZKCarousel that will stop the carousel from automatically traversing through the slides. There's also a Start() function to restart the slides.

ZacharyKhan commented 4 years ago

@cesarmtz93-wit I've released #31 which includes the changes you requested.

  1. I have added a function disableTap() which you should call before adding your own custom gesture recognizer. This function simple removes the default recognizer from the UICollectionView.

  2. I have made the UICollectionView within ZKCarousel public, which will allow you to add your own gesture recognizer to the UICollectionView and manipulate the UICollectionView as you wish. Just be sure to call disableTap() before adding your own recognizer to avoid multiple functions being called

If you have any other questions or concerns regarding this issue, feel free to continue the conversation here and I'd be happy to reopen the issue if necessary. Otherwise, please open a new issue for anything else. Best of luck!

cesarmtz93-wit commented 4 years ago

Awesome man! thanks for the help!