Open AshutoshSomkuwar opened 7 years ago
Depending on which carousel style you are using, that may be expected. You can try setting a fixed number of visible items so that it doesn't:
- (CGFloat)carousel:(iCarousel *)carousel valueForOption:(iCarouselOption)option withDefault:(CGFloat)value {
if (option == iCarouselOptionVisibleItems) {
return <some_number>;
}
return value;
}
Here return 1 is no spacing between items. so say for example if you want to give 10% space between two items then you can use following code. -(CGFloat)carousel:(iCarousel *)carousel valueForOption:(iCarouselOption)option withDefault:(CGFloat)value { if (option == iCarouselOptionSpacing) { return 1.1; } return value; }
@nicklockwood Many Thanks for this wonderful git. @github Special Thanks.
On the photo attached, I've set the number items to three and spacing to 1.1.
Before, the number of items was 10 and the spacing was also 1.1. The spacing was working for this case. But once I changed the number of items to a lower count, the spacing vanished.
Has somebody found a solution to this already?
As the number of items changing the space between items is also changing