Hiding back images in iCarouselTypeRotary view for iCarousel
You should implement the delegate:
- (CGFloat)carousel:(iCarousel *)_carousel valueForOption:(iCarouselOption)option withDefault:(CGFloat)value{
switch (option)
{
case iCarouselOptionVisibleItems:
{
return numberOfItemsIntheFront;
}
}
}
You'll need to change to a custom carousel type, and copy the implementation of iCarouselTypeRotary in your delegate. Then implement -carousel:itemAlphaForOffset:
so that items around the back have an alpha of zero.
In the latest version of iCarousel, the easiest way to do this is to set view.layer.doubleSided = NO on your carousel item views, or to use the iCarouselOptionShowBackfaces property, like this:
- (CGFloat)carousel:(iCarousel *)_carousel valueForOption:(iCarouselOption)option withDefault:(CGFloat)value
{
switch (option)
{
case iCarouselOptionShowBackfaces:
{
return NO;
}
default:
{
return value;
}
}
}