ZacharyKhan / ZKCarousel

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

Make UIImageView from ZKCarouselCell public #39

Closed alezoffoli closed 3 years ago

alezoffoli commented 3 years ago

I was thinking on having access to the imageView to edit some of its properties. Specifically, I currently want to be able to change the contentMode to .scaleAspectFit. But more customization might be cool for the future.

We can make imageView public, or could also consider having some public methods to allow editing of some specific properties, but making the property public seems more flexible. What do you think?

ZacharyKhan commented 3 years ago

This seems like a reasonable ask 😄 if you'd like to open a PR with these changes I'm happy to push them through and send out a new release.

alezoffoli commented 3 years ago

Hmm I've analyzed a little bit more here. As the ZKCarouselCell is entirely handled by ZKCarousel, it wouldn't be so trivial. It's possible, but we would have to pass the properties when creating a ZKCarouselSlide. I will implement this in my fork for now and contribute if I think this becomes an interesting thing for other users as well

Thanks!