CALayer Sublayers Flipping
Posted
by user128647
on Stack Overflow
See other posts from Stack Overflow
or by user128647
Published on 2010-06-09T06:36:30Z
Indexed on
2010/06/09
6:42 UTC
Read the original article
Hit count: 244
iphone
Hello All,
How to Flip CALayer Sublayer. i have tried :
CGFloat timeOffset = 0;
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform"];
CATransform3D transform = CATransform3DMakeRotation(M_PI/2, 0, 1, 0);
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
animation.toValue = [NSValue valueWithCATransform3D:transform];
animation.duration = 0.2;
animation.beginTime = CACurrentMediaTime() + timeOffset;
animation.fillMode = kCAFillModeBoth;
animation.removedOnCompletion = NO;
[selectedLayer addAnimation:animation forKey:nil];
timeOffset += 0.1;
in this code selected layer is not flipping properly,
Give me some suggestions. Thank you
© Stack Overflow or respective owner