CABasicAnimation 划线动画
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 划线动画的更多相关文章
- 核心动画基础动画(CABasicAnimation)关键帧动画
1.在iOS中核心动画分为几类: 基础动画(CABasicAnimation) 关键帧动画(CAKeyframeAnimation) 动画组(CAAnimationGroup) 转场动画(CATran ...
- 纯css实现Magicline Navigation(下划线动画导航菜单)
看别人网站的时候,看到一种导航菜单的动画,觉得很有意思,就仔细研究起来. 目前见过的动画有三种:水平下划线动画导航.水平背景动画导航.垂直动画导航,他们实现思路都是一样的,都是依赖 css3的同级通用 ...
- 之一:CABasicAnimation - 基本动画
嗷呜嗷呜嗷呜 // 将视图作为属性方便后面执行多个不同动画 _myView = [[UIView alloc] init]; _myView.layer.position = CGPointMake( ...
- IOS第18天(5,CABasicAnimation基本动画)
******* #import "HMViewController.h" @interface HMViewController () @property (nonatomic, ...
- Swift - 使用CABasicAnimation实现动画效果
1,CABasicAnimation类只有三个属性: fromValue:开始值 toValue:结束值 Duration:动画的时间 2,通过animationWithKeyPath键值对的方式设置 ...
- CABasicAnimation 基本动画
几个可以用来实现热门APP应用PATH中menu效果的几个方法 +(CABasicAnimation *)opacityForever_Animation:(float)time //永久闪烁的动画 ...
- CABasicAnimation 基本动画 分类: ios技术 2015-07-16 17:10 132人阅读 评论(0) 收藏
几个可以用来实现热门APP应用PATH中menu效果的几个方法 +(CABasicAnimation *)opacityForever_Animation:(float)time //永久闪烁的动画 ...
- Core Animation之CABasicAnimation(基础动画)
#import "ViewController.h" @interface ViewController () @property(nonatomic,strong)UIButto ...
- CSS3制作hover下划线动画
1.前几天看到Hexo的next主题标题hover效果很炫,自己尝试写了一个,另一个是next的实现,照例先上图 2.实现小黑科技 <div> <a href="javas ...
随机推荐
- 对ThreadLocal实现原理的一点思考
前言 在<透彻理解Spring事务设计思想之手写实现>中,已经向大家揭示了Spring就是利用ThreadLocal来实现一个线程中的Connection是同一个,从而保证了事务.本篇博客 ...
- 树莓派2上手 —— Raspbian的一些基本配置问题
先说点废话: 原来的笔记本因为上次被儿子拿着充电器玩的时候漏电烧了主板,修了之后还是时不时就突然宕机,Windows也完全起不来.后面这个问题倒是不大,真要用Windows的时候拿老婆的用一下就是了, ...
- 【iCore1S 双核心板_FPGA】例程十:乘法器实验——乘法器的使用
实验现象: 通过FPGA 的一个I/O 口连接LED:设定I/O 为输出模式.内部乘法器完成乘法计算后改变输出LED 的状态(红色LED 闪烁). 核心代码: module MULT( input C ...
- C语言学习之路
c语言学习 初识c语言 c语言数据类型.运算符和表达式(整数浮点数) 字符型数据/字符串 算术运算符和算术表达式(优先级,结合性等) 顺序程序设计(运算符之类内容,字符输入输出等) C/C++ 查看数 ...
- php中urlencode和urldecode的用法
URLEncode:是指针对网页url中的中文字符的一种编码转化方式,最常见的就是Baidu.Google等搜索引擎中输入中文查询时候,生成经过Encode过的网页URL.URLEncode的方式一般 ...
- [Bayes] Hist & line: Reject Sampling and Importance Sampling
吻合度蛮高,但不光滑. > L= > K=/ > x=runif(L) > *x*(-x)^/K)) > hist(x[ind],probability=T, + xla ...
- [UI] 06 - jQuery
前言 From : http://www.runoob.com/jquery/jquery-intro.html Ref: jQuery 实例 一.什么是 jQuery ? jQuery是一个Java ...
- Spark排序之SortBy
sortBy函数源码:接收三个参数,第一个参数必须,第二个和第三个参数非必要 def sortBy[K]( f: (T) => K, ascending: Boolean = true, num ...
- Hadoop2.7.3+HBase1.2.5+ZooKeeper3.4.6搭建分布式集群环境
Hadoop2.7.3+HBase1.2.5+ZooKeeper3.4.6搭建分布式集群环境 一.环境说明 个人理解:zookeeper可以独立搭建集群,hbase本身不能独立搭建集群需要和hadoo ...
- [原]openstack-kilo--issue(二十一) instance can't get ip 虚拟机不能得到ip(2)
===问题点==== 在使用vlan模式部署compute节点的时候出现了下面的错误:在controller节点的dhcp-agent.log中 2017-01-22 20:19:34.178 241 ...