diff --git a/iCarousel.podspec.json b/iCarousel.podspec.json index 382ab73678..4090405c5d 100644 --- a/iCarousel.podspec.json +++ b/iCarousel.podspec.json @@ -1,6 +1,6 @@ { - "name": "iCarousel", - "version": "1.8.3", + "name": "iCarousel-CATransform3D", + "version": "1.0.1", "license": { "type": "zlib", "file": "LICENCE.md" @@ -11,8 +11,8 @@ "Nick Lockwood": "support@charcoaldesign.co.uk" }, "source": { - "git": "https://github.com/nicklockwood/iCarousel.git", - "tag": "1.8.3" + "git": "https://github.com/xhzengAIB/iCarousel.git", + "tag": "1.0.1" }, "source_files": "iCarousel/iCarousel.{h,m}", "requires_arc": true, diff --git a/iCarousel/iCarousel.m b/iCarousel/iCarousel.m index 485a878bb8..57162ac7f1 100644 --- a/iCarousel/iCarousel.m +++ b/iCarousel/iCarousel.m @@ -863,8 +863,13 @@ - (void)transformItemView:(UIView *)view atIndex:(NSInteger)index CATransform3D transform = [self transformForItemViewWithOffset:offset]; //transform view - view.superview.layer.transform = transform; - + CABasicAnimation *basicAnimation = [CABasicAnimation animationWithKeyPath:@"transform"]; + basicAnimation.fillMode = kCAFillModeForwards; + basicAnimation.removedOnCompletion = NO; + basicAnimation.duration = 0.15; + basicAnimation.toValue = [NSValue valueWithCATransform3D:transform]; + [view.superview.layer addAnimation:basicAnimation forKey:nil]; + //backface culling BOOL showBackfaces = view.layer.doubleSided; if (showBackfaces)