CABasicAnimation动画及其keypath值和作用
//tarnsform放大缩小动画 CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];//根据传的keypath实现不同动画 animation.duration = 0.3f; animation.repeatCount = ; animation.autoreverses = YES; animation.fromValue = [NSNumber numberWithFloat:1.0f]; animation.toValue = [NSNumber numberWithFloat:1.1f]; animation.byValue = [NSNumber numberWithFloat:0.9f]; animation.removedOnCompletion = YES; [view.layer addAnimation:animation forKey:@"animation_key"];
keypath值:
transform.scale = 大小比例
transform.scale.x = 宽的比例转换
transform.scale.y = 高的比例转换
transform.rotation.z = 平面的旋转
opacity = 透明度
margin = 布局
zPosition = 翻转
backgroundColor = 背景颜色
cornerRadius = 圆角
borderWidth = 边框宽
bounds = 大小
contents = 内容
contentsRect = 内容大小
cornerRadius = 圆角
frame = 大小位置
hidden = 显示隐藏
mask
masksToBounds
opacity
position
shadowColor
shadowOffset
shadowOpacity
shadowRadius
CABasicAnimation动画及其keypath值和作用的更多相关文章
- iOS基础动画的KeyPath取值
一 .基础动画 1.基础动画的属性详解 注:Core Animation的动画执行过程都是在后台操作的,不会阻塞主线程. 属性 解读 Autoreverses 设定这个属性为 YES 时,在它到达目的 ...
- iOS开发——动画编程Swift篇&(四)CABasicAnimation动画
CABasicAnimation动画 //CABasicAnimation-不透明度 @IBAction func cabOpacity() { let animation = CABasicAnim ...
- CABasicAnimation动画
使用CABasicAnimation动画: CALayer *znzLayer; = [[CALayer alloc]init]; //创建不断该表CALayer的transform属性动画 CABa ...
- display值的作用分别是什么?relative和absolute分别是相对谁定位的?
display值的作用分别是什么? none:元素隐藏,不占据位置 block:该元素显示为块级元素 inline:默认,该元素会被显示为内联元素 inline-block:行内块元素 list-it ...
- .get的取值特点:.get只起到取值的作用 不能对原值修改
#银行支付接口 def pay_interface(username,cost): user_dic=db_handler.select(username) if user_dic.get('bala ...
- WPF动画之后属性值无法改变
原文:WPF动画之后属性值无法改变 前一段时间使用WPF写2048游戏的时候,遇到下面的情形:使用按键对色块进行移动时,触发位置左边X和Y属性的DoubleAnimation动画,但是 ...
- iOS开发CABasicAnimation动画理解
1.CALayer简介 CALayer是个与UIView很类似的概念,同样有backgroundColor.frame等相似的属性,我们可以将UIView看做一种特殊的CALayer.但实际上UIVi ...
- Content-Type属性的取值和作用
1.Content-Type 的值类型: 1.1 application/json:消息主体是序列化后的 JSON 字符串 1.2 application/x-www-form-urlencoded: ...
- 【react】---react中key值的作用
一.React中key值得作用 react中的key属性,它是一个特殊的属性,它是出现不是给开发者用的,而是给React自己使用,有了key属性后,就可以与组件建立了一种对应关系,简单说,react利 ...
随机推荐
- 如果这种方式导致程序明显变慢或者引起其他问题,我们要重新思考来通过 goroutines 和 channels 来解决问题
https://github.com/Unknwon/the-way-to-go_ZH_CN/blob/master/eBook/09.3.md 9.3 锁和 sync 包 在一些复杂的程序中,通常通 ...
- svn服务器 vim 修改 authz passwd 添加用户
进入svn服务器 vim 修改 authz passwd 添加用户 SVN服务器之------2,配置PhpStorm连接SVN服务器(其他IDE大同小异) - 学到老死 - 博客园 https:// ...
- ORACLE DATABASE 10g EXPRESS EDITION LICENSE AGREEMENT
启动Tomcat之后出现全是英文错误: ORACLE DATABASE 10g EXPRESS EDITION LICENSE AGREEMENT To use this license, yo ...
- 百度小程序转换微信小程序
Python脚本,一键转换Github地址:https://github.com/DWmelon/py-transfer-BdToWx 运行条件 具备Python环境,可在命令行中使用Python命令 ...
- AR模型脱卡,unity端实现步骤详情
AR模型脱卡unity端实现具体步骤 AR模型脱卡的原理 利用一些unity端AR插件做AR应用.通常会有一个需求,当识别物消失的时候,将3D模型从识别物这个父物体上移除,显示在屏幕中央.那么原理就显 ...
- Algorithm: bit manipulation
1. 一个数的从右起第p1位和第p2位swap n位 unsigned int swapBits(unsigned int x, unsigned int p1, unsigned int p2, u ...
- myeclipse 安装flex插件后变为中文 修改配置文件切换到英文界面
解决办法: 1. cmd 敲命令进入安装目录,运行myeclipse.exe -nl en后,启动为英文 在安装目录下新建txt,改名为myeclipse.bat,将上面那行命令写入保存,再发送快捷方 ...
- 使用meld作为git的辅助工具
原文链接: https://lrita.github.io/2017/05/14/use-meld-as-git-tool/?hmsr=toutiao.io&utm_medium=toutia ...
- zabbix 报表
摘自: https://www.w3cschool.cn/zabbix_manager/zabbix_manager-z45f1zie.html
- tkinter之对话框
对话框的一个例子: from tkinter.dialog import * from tkinter import * def investigation(): d=Dialog(None,titl ...