实现图标抖动

来源:互联网 发布:淘宝导航css代码模板 编辑:程序博客网 时间:2024/05/16 11:41

 CATransform3D transform;

    transform =CATransform3DMakeRotation(0.08,0, 0, 1.0);

    CABasicAnimation *animation = [CABasicAnimationanimationWithKeyPath:@"transform"];

    animation.toValue = [NSValuevalueWithCATransform3D:transform];

    animation.autoreverses =YES;

    animation.duration =0.1;

    animation.repeatCount =10000;

    animation.delegate =self;

    [[selflayer] addAnimation:animationforKey:@"wiggleAnimation"];





原创粉丝点击