-(void)setPopAnimation:(UIImageView*)view
{
CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
anim.duration = 1;
anim.repeatCount = MAXFLOAT;
anim.autoreverses = YES;
anim.fromValue = [NSNumber numberWithFloat:0.8];
anim.toValue = [NSNumber numberWithFloat:1.2];
[view.layer addAnimation:anim forKey:nil];
}
//浮动
-(void)setImgAnimation:(UIImageView*)view
{
CABasicAnimation *animatio1 = [CABasicAnimation animationWithKeyPath:@"transform.translation.y"];
animatio1.toValue = [NSNumber numberWithInt:20];
animatio1.repeatCount = MAXFLOAT;
animatio1.duration = 1;
animatio1.autoreverses = YES;
animatio1.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
[view.layer addAnimation:animatio1 forKey:nil];
}
-(void)addChangeViewAnimation
{
CATransition *animation = [CATransition animation];
animation.type = kCATransitionPush;
animation.subtype = kCATransitionFromRight;
animation.delegate = self;
animation.duration = 1;
animation.timingFunction = UIViewAnimationCurveEaseInOut;
animation.fillMode = kCAFillModeForwards;
animation.endProgress = 1.0f;
animation.removedOnCompletion = YES;
// animation.type = @"kCATransitionFade";//110
animation.type = @"rippleEffect";
[self.superview.superview.superview.layer addAnimation:animation forKey:@"animation"];
}