nicklockwood / iCarousel

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

Different spacing for different number of items. #859

Open Mihailstoica350 opened 6 years ago

Mihailstoica350 commented 6 years ago

Hey there, first of all thanks for this great project. Here is my problem: I am using the iCarouselTypeRotary and the distance between the items (visually) is different depending on the number of items. I've seen a similar problem and your solution with iCarouselOptionVisibleItems didn't do much.. Looking forward to receive your response.

somifai commented 5 years ago

Same case here. This is what I'm currently getting.

Screen Shot 2019-05-07 at 1 57 02 PM

mrahmalevich commented 4 years ago

Was looking for answer the same question and didn't find a response, so posting my solution here. My goal was to persist rotary carousel layout for any number of items and I end up using custom carousel and overriding carousel(itemTransformForOffset: baseTransform:) with custom implementation that hardcodes count value.

Take a look at screenshot below:

Screenshot 2019-11-21 02 04 26

Hope it helps someone!