0

I have an iCarousel and I want to make the center item larger than others. I saw this question that gives the answer, the only problem is that the are not in line, but in circular way, how can I put the items one after the other like this (iCarouselTypeLinear):

carousel

Community
  • 1
  • 1
ytpm
  • 4,962
  • 6
  • 56
  • 113

1 Answers1

0

I just modified the code from the above link. Take a look at the CATransform functions.

- (CATransform3D)carousel:(iCarousel *)carousel itemTransformForOffset:(CGFloat)offset baseTransform:(CATransform3D)transform
{
    const CGFloat offsetFactor = [self carousel:carousel valueForOption:iCarouselOptionSpacing withDefault:1.0f]*carousel.itemWidth;

    transform = CATransform3DTranslate(transform, offset*offsetFactor, 0, 0));
    return transform;
}
lead_the_zeppelin
  • 2,017
  • 13
  • 23