Xcode中的线条动画(Line animation in Xcode)
我想在xcode中做动画线条画。 我正在为iPhone开发。 我找到了一些使用CABasicAnimation的教程。 但是,当我尝试创建这样的CABasicAnimation对象时
CABasicAnimation *pathAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
我收到一个错误:使用未声明的标识符CABasicAnimation。
我是否需要一些库来使用CABasicAnimation对象? 我不确定这是怎么回事。 是否有任何教程可以解释Xcode中完整的动画过程,因为我发现的所有内容都是从定义CABasicAnimation对象开始的,没有任何解释我之前应该配置或导入的内容。
我正在使用XCode 4.4.1和Mountain Lion。 非常感谢!
I am trying to do animating line drawing in xcode. I am developing for iPhone. I found some tutorials which use CABasicAnimation. But, when I try to create an CABasicAnimation object like this
CABasicAnimation *pathAnimation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
I get an error: use of undeclared identifier CABasicAnimation.
Do I need some library for using CABasicAnimation object? I am not sure how is this working. Is there any tutorial that explain complete process of animation in Xcode, because all I found is starting with defining CABasicAnimation object, without any explanation what should I configure or import before.
I am using XCode 4.4.1 and a Mountain Lion. Thanks a lot!
原文:https://stackoverflow.com/questions/12704362