CGFloat animateDuration = ;

    UIBezierPath *bezierPath = [[UIBezierPath alloc] init];
CGPoint centerFromP = noAnimateView.center;
[bezierPath moveToPoint:centerFromP];
CGPoint centerEndP = endView.center;
[bezierPath addLineToPoint:centerEndP]; CAShapeLayer *layer = [CAShapeLayer layer];
layer.lineWidth = ;
layer.strokeColor = [UIColor blackColor].CGColor;
layer.fillColor = [UIColor clearColor].CGColor;
layer.path = bezierPath.CGPath;
layer.lineCap = kCALineCapRound;
// [layer setLineDashPattern:[NSArray arrayWithObjects:[NSNumber numberWithInt:15], [NSNumber numberWithInt:10],nil]]; //create the keyframe animation
CABasicAnimation *animation = [CABasicAnimation animation];
animation.keyPath = @"strokeEnd";
animation.fromValue = [NSNumber numberWithInteger:];
animation.toValue = [NSNumber numberWithInteger:];
animation.duration = animateDuration;
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
[layer addAnimation:animation forKey:nil];

CABasicAnimation 划线动画的更多相关文章

  1. 核心动画基础动画(CABasicAnimation)关键帧动画

    1.在iOS中核心动画分为几类: 基础动画(CABasicAnimation) 关键帧动画(CAKeyframeAnimation) 动画组(CAAnimationGroup) 转场动画(CATran ...

  2. 纯css实现Magicline Navigation(下划线动画导航菜单)

    看别人网站的时候,看到一种导航菜单的动画,觉得很有意思,就仔细研究起来. 目前见过的动画有三种:水平下划线动画导航.水平背景动画导航.垂直动画导航,他们实现思路都是一样的,都是依赖 css3的同级通用 ...

  3. 之一:CABasicAnimation - 基本动画

    嗷呜嗷呜嗷呜 // 将视图作为属性方便后面执行多个不同动画 _myView = [[UIView alloc] init]; _myView.layer.position = CGPointMake( ...

  4. IOS第18天(5,CABasicAnimation基本动画)

    ******* #import "HMViewController.h" @interface HMViewController () @property (nonatomic, ...

  5. Swift - 使用CABasicAnimation实现动画效果

    1,CABasicAnimation类只有三个属性: fromValue:开始值 toValue:结束值 Duration:动画的时间 2,通过animationWithKeyPath键值对的方式设置 ...

  6. CABasicAnimation 基本动画

    几个可以用来实现热门APP应用PATH中menu效果的几个方法 +(CABasicAnimation *)opacityForever_Animation:(float)time //永久闪烁的动画 ...

  7. CABasicAnimation 基本动画 分类: ios技术 2015-07-16 17:10 132人阅读 评论(0) 收藏

    几个可以用来实现热门APP应用PATH中menu效果的几个方法 +(CABasicAnimation *)opacityForever_Animation:(float)time //永久闪烁的动画 ...

  8. Core Animation之CABasicAnimation(基础动画)

    #import "ViewController.h" @interface ViewController () @property(nonatomic,strong)UIButto ...

  9. CSS3制作hover下划线动画

    1.前几天看到Hexo的next主题标题hover效果很炫,自己尝试写了一个,另一个是next的实现,照例先上图 2.实现小黑科技 <div> <a href="javas ...

随机推荐

  1. 关于es6中的yield

    <!DOCTYPE html> <html> <head> <title></title> <meta charset="u ...

  2. 【iCore4 双核心板_ARM】例程十四:FATFS实验——文件操作

    实验现象: 核心代码: int main(void) { int i,j; FIL file; FATFS fatfs; static FRESULT res; unsigned ]; unsigne ...

  3. AI金融知识自学偏量化方向-了解不同类型的机器学习2

    有监督学习 vs 无监督学习 迭代和评估 偏差方差权衡 结合有监督学习和无监督学习(半监督学习)

  4. Ubuntu系统搭建SVN服务器

    Ubuntu系统搭建SVN服务器 参考地址:http://git.devzeng.com/blog/aliyun-ubuntu-svn-server.html 安装软件 依次在终端中执行下面的命令安装 ...

  5. glob通配符

    描述glob是shell使用的路径匹配符,类似于正则表达式,但是与正则表达式不完全相同.在linux操作中如文件匹配等等其实已经使用了glob通配符.由于其在路径匹配方面的强大,其他语言也有相应的实现 ...

  6. MTK 修改默认时区

    首先介绍应用程序修改 : AlarmManager mAlarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE); mA ...

  7. [JS] Topic - variable and function hoisting

    Ref: 深入理解js的变量提升和函数提升 一.变量提升 简直就是es5的遗毒! console.log(global); // undefined 竟然能打印?因为变量提升,下一行就有定义 var ...

  8. Hook lua库函数时遇到的问题

    最近在为distri.lua实现一个lua调试系统,有一个简单的需求,lua导入一个文件的时候,将这个文件的文件名记录下来, 以方便调试器在设置断点的时候判断是否一个合法的文件. lua导入文件是通过 ...

  9. Python实现C代码统计工具(三)

    目录 Python实现C代码统计工具(三) 声明 一. 性能分析 1.1 分析单条语句 1.2 分析代码片段 1.3 分析整个模块 二. 制作exe Python实现C代码统计工具(三) 标签: Py ...

  10. linux几个命令

    ll |wc -l 统计目录下多少文件 df -h 磁盘统计大小 du -sh 该目录占磁盘总大小 du -sh * 该目录下每个目录占用磁盘大小