首页 > 代码库 > iOS组动画,

iOS组动画,

#ViewController.m

#import "ViewController.h"@interface ViewController ()/** *  storybord连线 */@property (weak, nonatomic) IBOutlet UIImageView *imageView;@end@implementation ViewController- (void)viewDidLoad {    [super viewDidLoad];}-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{    NSLog(@"touchesBegan");    self.view.userInteractionEnabled = NO;        //创建旋转动画对象    CABasicAnimation *rotate = [CABasicAnimation animation];    rotate.keyPath = @"transform.rotation";    rotate.toValue = http://www.mamicode.com/@(M_PI * 10);"transform.scale";    scale.toValue = http://www.mamicode.com/@(0.0);"transform.translation";    translation.toValue = http://www.mamicode.com/[NSValue valueWithCGPoint:CGPointMake(300, 500)];"animationDidStart");}#pragma mark - 动画结束-(void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag{    self.view.userInteractionEnabled = YES;    NSLog(@"animationDidStop");}-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{    NSLog(@"touchesEnded");}@end

 

iOS组动画,