Я использую две анимации в своем объективном проекте C. Кажется, я не работаю, используя apportable. Первые методы будут поддерживаться?CAKeyframeAnimation в Appportable
, если (тег == 1) { CAKeyframeAnimation * анимационной = [CAKeyframeAnimation animationWithKeyPath: @ "положение"]; animation.duration = 3; animation.removedOnCompletion = YES; animation.fillMode = kCAFillModeForwards; animation.repeatCount = 1; // repeat forever animation.autoreverses = NO; animation.rotationMode = kCAAnimationRotateAuto; animation.timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionLinear]; animation.calculationMode = kCAAnimationCubic;
UIBezierPath *curvedPath = [UIBezierPath bezierPath]; CGPoint cp; cp.x=100; cp.y=100; [curvedPath moveToPoint:CGPointMake(300,300)]; [curvedPath addLineToPoint:cp]; animation.path=curvedPath.CGPath; animation.delegate=self; //self.alpha=0; [ivcontainer.layer addAnimation:animation forKey:NULL]; } else { ivcontainer.center=CGPointMake(300,300); [UIView beginAnimations:NULL context:NULL]; [UIView setAnimationDuration:3]; [UIView setAnimationRepeatCount:1]; CGPoint cp; cp.x=100; cp.y=100; ivcontainer.center=cp; [UIView commitAnimations]; }
отредактируйте этот вопрос – LearnCocos2D