How to do animation in iphone/ipad application
I wan开发者_开发问答t to rotate one disk in my iphone/ipad application.And on that rotate I want select particular area from that disk like in pie chart application.If any one know that then please tell me.
Thanks In advance.
You may want to read Apple's CoreAnimation Introduction, the Quartz 2D programming guide or, if you want to accomplish something more "sophisticated", learn OpenGL ;-)
You can try this, placardView is basically UIView
CALayer *pLayer = placardView.layer; float radians = 3.120; CATransform3D transforms; transforms = CATransform3DMakeRotation(radians, 0.0, 0.0, 0.0); CABasicAnimation *aAnimation; aAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"]; aAnimation.toValue = [NSValue valueWithCATransform3D:transform]; aAnimation.duration = spinSpeed; aAnimation.cumulative = YES; aAnimation.repeatCount = 1e100f; // this is infinity in IEEE 754 floating point format [pLayer addAnimation:aAnimation forKey:@"animatePlacardViewToSpin"];
精彩评论