Animation Combo (wait effect when Uber starts) by Wusheying
- (void) Startanimation {
Self.Layer.Maskstobounds= 0;
Self.Layer.Cornerradius= -;
if ( Self.Layer.sublayers== Nil) {
[ Selfsetupanimation];
}
Self.Layer. Speed= 1;
}
- (void) Setupanimation {
cabasicanimation *posanim = [cabasicanimationAnimationwithkeypath:@ "Transform.scale"];
Posanim.Fromvalue= @ (0.01);
Posanim.Tovalue= @ (1);
Posanim.Duration= 1;
Posanim.timingfunction= [camediatimingfunctionFunctionwithname:Kcamediatimingfunctioneaseineaseout];
cabasicanimation *opacity = [cabasicanimationAnimationwithkeypath:@ "Opacity"];
Opacity.Fromvalue= @ (1);
Opacity.Tovalue= @ (0);
Opacity.Duration= 1;
Opacity.timingfunction= [camediatimingfunctionFunctionwithname:Kcamediatimingfunctioneaseineaseout];
Caanimationgroup *animgroup = [CaanimationgroupAnimation];
Animgroup.Animations= [Nsarrayarraywithobjects:p Osanim, opacity,Nil];
Animgroup.Duration= 1;
Animgroup.RepeatCount= HUGE;
[ Self.Layeraddanimation: AnimgroupForkey:Nil];}
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Animation Combo (wait effect when Uber starts)