aataraxiaa / ScalingCarousel

A super simple carousel view with scaling transitions written in Swift
MIT License
756 stars 98 forks source link

Add toggle for enabling invisible scrollview (#1) #59

Closed attyran closed 4 years ago

attyran commented 5 years ago

Hello,

I am using this library for a project, and needed a way to disable scrolling for the invisible scroll view. This doesn't seem to be available yet, so I forked the project and added functionality for it. Adding this PR in hope that it can go to the master branch eventually.

aataraxiaa commented 5 years ago

Thanks for opening this @attyran 👍🏽. Is the intention that you can disable scrolling on the entire carousel?

i.e What is the use case for this?

Once I know this, I can review this better.

attyran commented 5 years ago

Hi @superpeteblaze,

Yes, that is the intention. For my project, I have a selected state for the centered cell. Upon clicking on the cell, I would magnify it and hide the left and right cells next to it. In addition, I would disable scrolling. Clicking on the cell again would scale it back, reshow the left and right cells, and enable scrolling.

Hope that helps.

aataraxiaa commented 5 years ago

Great, thanks for getting back to me.

In that case, I have a couple of suggested changes to the PR.