Thursday, 1 October 2015

How To Work With keyframe UIAnimation In Ios/Iphone


=> Here USe Animation on VIew UIView :

=> First You Have Take View Outlet Then Use it As KeyFrame Animation:
=> Using CA Key Frame It Work WithVlaue and 3D Transfer And Scaling Translateing: 

 CAKeyframeAnimation *keyFrameAniamtion = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
    NSValue *aValue1 = [NSValue valueWithCATransform3D:CATransform3DIdentity];
    NSValue *aValue2 = [NSValue valueWithCATransform3D:CATransform3DScale(_redView.layer.transform, 1.5, 1.5, 1.5)];
   
    NSValue *aValue3 = [NSValue valueWithCATransform3D:CATransform3DTranslate(_redView.layer.transform, 100, 50, 0)];
   
    NSValue *aValue4 = [NSValue valueWithCATransform3D:CATransform3DRotate(_redView.layer.transform, M_PI, 0.0, 1.0, 1.0)];
   
    keyFrameAniamtion.values = [NSArray arrayWithObjects:aValue1,aValue2,aValue3,aValue4,nil];
   
    Work with CAanimation :-
=> Using Animation Using Diffrent Object And Take Some Example For Belove Use For:
 


=> Used CA Core Animation And Work With Group of Diffrent KeyFrmae Anition Work Together :-

 CAAnimationGroup *animationGroup = [CAAnimationGroup animation];
    animationGroup.animations = [NSArray arrayWithObjects:basicAnimtion,keyFrameAniamtion, nil];
    animationGroup.duration = 3.0;
    animationGroup.repeatCount =  HUGE_VALF;
    animationGroup.autoreverses = YES;
    animationGroup.delegate =self;
    [_redView.layer addAnimation:animationGroup forKey:@"groupAnimation"];