首页 > 其他 > 详细

UIImageView旋转动画

时间:2015-08-06 18:23:16      阅读:159      评论:0      收藏:0      [点我收藏+]

  _loadingView = [[UIImageView alloc]initWithFrame:CGRectMake(150, 300, 50, 50)];

    _loadingView.image = [UIImage imageNamed:@"22"];

    [self.view addSubview:_loadingView];

    CABasicAnimation* rotationAnimation;

    rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];

    rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI * 2.0 ];

    rotationAnimation.duration = 0.2;

    rotationAnimation.cumulative = YES;

    rotationAnimation.repeatCount = 100000;

    

    [_loadingView.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"];//开始动画

    _loadingView.layer removeAnimationForKey:<#(NSString *)#>//结束动画

版权声明:本文为博主原创文章,未经博主允许不得转载。

UIImageView旋转动画

原文:http://blog.csdn.net/u014202635/article/details/47320033

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!