Swati
Swati

Reputation: 1443

Carousel non-repeating views

I am using carousel. I have the set the type as iCarouselTypeRotary. What my issue is the images keep repeating i.e. I have 4 images only. After the last image, 1st image repeats and it continues. I want it to stop like iCarouselTypeCoverFlow2 type. Please help. I cannot use any other type. I want this style only for carousel.

Thanks in Advance.

Upvotes: 1

Views: 1082

Answers (1)

Vishnu
Vishnu

Reputation: 2243

I think you will add the images in the Array.Check for the array and Maybe the following code helps you

This code is as per new iCarousel lib files

 - (CGFloat)carousel:(iCarousel *)carousel valueForOption:(iCarouselOption)option withDefault:(CGFloat)value
{
if (option == iCarouselOptionSpacing)
{
    return value * 1.1f;
}

if (option == iCarouselOptionWrap)
{
    return NO;
}
return value;
}

This code is as per old iCarousel lib files

-(BOOL)carouselShouldWrap:(iCarousel *)carousel
{
return NO;
}

Upvotes: 6

Related Questions