Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions iCarousel.podspec.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iCarousel",
"version": "1.8.3",
"name": "iCarousel-CATransform3D",
"version": "1.0.1",
"license": {
"type": "zlib",
"file": "LICENCE.md"
Expand All @@ -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,
Expand Down
9 changes: 7 additions & 2 deletions iCarousel/iCarousel.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down