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. 字符串与Unicode码的相互转换

    //1,字符串转换为unicode码 var s = '吴'; //2,unicode码转字符串 '\u5434'.toString(16) //吴 或者 String.fromCharCode(21 ...

  2. SDL示例一:实现七段数码管的显示

    [时间:2017-05] [状态:Open] [关键词:sdl2,数字,七段数码管,图形显示,示例代码] 0 引言 本文是针对我的step-into-sdl2/7LedDigit的原理介绍,有兴趣的可 ...

  3. php5.6-lumen与php5.6-phalcon性能对比

    场景一: 两个框架简单输出helloworld phalcon:{QPS:7349,平均响应时间:124.11ms},lumen{QPS:1327,平均响应时间:721.54ms} QPS: phal ...

  4. Entlib DAAB映射枚举类型

    1. IRowMapper<UserDto> addressMapper = MapBuilder<UserDto> .MapAllProperties() .Map(p =& ...

  5. MyBatis XML转义字符

    当我们需要通过xml格式处理sql语句时,经常会用到< ,<=,>,>=等符号,但是很容易引起xml格式的错误,这样会导致后台将xml字符串转换为xml文档时报错,从而导致程序 ...

  6. Path expected for join!错误处理

    在Hibernate中,进行连接查询时,如果使用join语句,就容易产生标题所示的错误. 比如from Content o left join Mcp mcp where o.mcp.id=mcp.i ...

  7. Go 实现异常处理机制

    实例: package main import "fmt" type DevideError struct { devidee int devider int } func (de ...

  8. java socket 服务器多线程 数据转发的研究实践

    项目中借鉴了以下资料: https://www.cnblogs.com/whenever/p/5526420.html https://www.cnblogs.com/jpwz/p/5715852.h ...

  9. php文件缓存方法总结

    为大家分享很全的php文件缓存,供大家参考,具体内容如下 <?php class cache {  private static $_instance = null;    protected ...

  10. Web上传文件的原理及实现

    现在有很多Web程序都有上传功能,实现上传功能的组件或框架也很多,如基于java的Commons FileUpload.还有Struts1.x和Struts2中带的上传文件功能(实际上,Struts2 ...