首页 > 移动平台 > 详细

iOS UI进阶-3.0 核心动画

时间:2015-09-29 13:07:22      阅读:241      评论:0      收藏:0      [点我收藏+]

lCore Animation是一组非常强大的动画处理API,使用它能做出非常炫丽的动画效果,而且往往是事半功倍,使用它需要先添加QuartzCore.framework和引入对应的框架<QuartzCore/QuartzCore.h>

Core Animation的使用,请参考最下面的博客。

由于Core Animation动画,改变的只是一个影子,实际的位置和尺寸都不会有变化。因而,在实际开发中,还是建议直接使用UIView动画。

UIView动画

- (void)testViewSimpleAnim
{
    [UIView beginAnimations:nil context:nil];
    // 动画执行完毕后, 会自动调用self的animateStop方法
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDidStopSelector:@selector(animateStop)];
    self.myview.center = CGPointMake(200, 300);
    [UIView commitAnimations];
}

-(void)animateStop
{
    NSLog(@"%@",@"--animateStop--");
}

效果是从红色框移动:

技术分享

 

 

 

参考博客:

Core Animation1-简介:http://www.cnblogs.com/mjios/archive/2013/04/15/3021039.html

Core Animation2-CABasicAnimation:http://www.cnblogs.com/mjios/archive/2013/04/15/3021343.html

iOS UI进阶-3.0 核心动画

原文:http://www.cnblogs.com/jys509/p/4845952.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!