CALayer可动画属性

2023-12-09 00:18
文章标签 属性 动画 calayer

本文主要是介绍CALayer可动画属性,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

这些属性用于CAAnimation中的KeyPath设置.
(摘自官方文档, 方便查询.)

表一 CALayer中可以进行动画的属性列表以及它们的默认动画
PropertyDefault animation
anchorPointUses the default implied CABasicAnimation object, described in Table B-2.
backgroundColorUses the default implied CABasicAnimation object, described in Table B-2.
backgroundFiltersUses the default implied CATransition object, described in Table B-3. Sub-properties of the filters are animated using the default implied CABasicAnimation object, described in Table B-2.
borderColorUses the default implied CABasicAnimation object, described in Table B-2.
borderWidthUses the default implied CABasicAnimation object, described in Table B-2.
boundsUses the default implied CABasicAnimation object, described in Table B-2.
compositingFilterUses the default implied CATransition object, described in Table B-3. Sub-properties of the filters are animated using the default implied CABasicAnimation object, described in Table B-2.
contentsUses the default implied CABasicAnimation object, described in Table B-2.
contentsRectUses the default implied CABasicAnimation object, described in Table B-2.
cornerRadiusUses the default implied CABasicAnimation object, described in Table B-2.
doubleSidedThere is no default implied animation.
filtersUses the default implied CABasicAnimation object, described in Table B-2. Sub-properties of the filters are animated using the default implied CABasicAnimation object, described in Table B-2.
frameThis property is not animatable. You can achieve the same results by animating the bounds and position properties.
hiddenUses the default implied CABasicAnimation object, described in Table B-2.
maskUses the default implied CABasicAnimation object, described in Table B-2.
masksToBoundsUses the default implied CABasicAnimation object, described in Table B-2.
opacityUses the default implied CABasicAnimation object, described in Table B-2.
positionUses the default implied CABasicAnimation object, described in Table B-2.
shadowColorUses the default implied CABasicAnimation object, described in Table B-2.
shadowOffsetUses the default implied CABasicAnimation object, described in Table B-2.
shadowOpacityUses the default implied CABasicAnimation object, described in Table B-2.
shadowPathUses the default implied CABasicAnimation object, described in Table B-2.
shadowRadiusUses the default implied CABasicAnimation object, described in Table B-2.
sublayersUses the default implied CABasicAnimation object, described in Table B-2.
sublayerTransformUses the default implied CABasicAnimation object, described in Table B-2.
transformUses the default implied CABasicAnimation object, described in Table B-2.
zPositionUses the default implied CABasicAnimation object, described in Table B-2.
表二: transform属性内的KeyPath
Field Key PathDescription
rotation.xSet to an NSNumber object whose value is the rotation, in radians, in the x axis.
rotation.ySet to an NSNumber object whose value is the rotation, in radians, in the y axis.
rotation.zSet to an NSNumber object whose value is the rotation, in radians, in the z axis.
rotationSet to an NSNumber object whose value is the rotation, in radians, in the z axis. This field is identical to setting the rotation.z field.
scale.xSet to an NSNumber object whose value is the scale factor for the x axis.
scale.ySet to an NSNumber object whose value is the scale factor for the y axis.
scale.zSet to an NSNumber object whose value is the scale factor for the z axis.
scaleSet to an NSNumber object whose value is the average of all three scale factors.
translation.xSet to an NSNumber object whose value is the translation factor along the x axis.
translation.ySet to an NSNumber object whose value is the translation factor along the y axis.
translation.zSet to an NSNumber object whose value is the translation factor along the z axis.
translationSet to an NSValue object containing an NSSize or CGSize data type. That data type indicates the amount to translate in the x and y axis.

这篇关于CALayer可动画属性的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/471808

相关文章

python删除xml中的w:ascii属性的步骤

《python删除xml中的w:ascii属性的步骤》使用xml.etree.ElementTree删除WordXML中w:ascii属性,需注册命名空间并定位rFonts元素,通过del操作删除属... 可以使用python的XML.etree.ElementTree模块通过以下步骤删除XML中的w:as

Python打印对象所有属性和值的方法小结

《Python打印对象所有属性和值的方法小结》在Python开发过程中,调试代码时经常需要查看对象的当前状态,也就是对象的所有属性和对应的值,然而,Python并没有像PHP的print_r那样直接提... 目录python中打印对象所有属性和值的方法实现步骤1. 使用vars()和pprint()2. 使

CSS3中的字体及相关属性详解

《CSS3中的字体及相关属性详解》:本文主要介绍了CSS3中的字体及相关属性,详细内容请阅读本文,希望能对你有所帮助... 字体网页字体的三个来源:用户机器上安装的字体,放心使用。保存在第三方网站上的字体,例如Typekit和Google,可以link标签链接到你的页面上。保存在你自己Web服务器上的字

SpringBoot读取ZooKeeper(ZK)属性的方法实现

《SpringBoot读取ZooKeeper(ZK)属性的方法实现》本文主要介绍了SpringBoot读取ZooKeeper(ZK)属性的方法实现,强调使用@ConfigurationProperti... 目录1. 在配置文件中定义 ZK 属性application.propertiesapplicati

Java反射实现多属性去重与分组功能

《Java反射实现多属性去重与分组功能》在Java开发中,​​List是一种非常常用的数据结构,通常我们会遇到这样的问题:如何处理​​List​​​中的相同字段?无论是去重还是分组,合理的操作可以提高... 目录一、开发环境与基础组件准备1.环境配置:2. 代码结构说明:二、基础反射工具:BeanUtils

MySQL 事务的概念及ACID属性和使用详解

《MySQL事务的概念及ACID属性和使用详解》MySQL通过多线程实现存储工作,因此在并发访问场景中,事务确保了数据操作的一致性和可靠性,下面通过本文给大家介绍MySQL事务的概念及ACID属性和... 目录一、什么是事务二、事务的属性及使用2.1 事务的 ACID 属性2.2 为什么存在事务2.3 事务

Kotlin Compose Button 实现长按监听并实现动画效果(完整代码)

《KotlinComposeButton实现长按监听并实现动画效果(完整代码)》想要实现长按按钮开始录音,松开发送的功能,因此为了实现这些功能就需要自己写一个Button来解决问题,下面小编给大... 目录Button 实现原理1. Surface 的作用(关键)2. InteractionSource3.

Spring Cache注解@Cacheable的九个属性详解

《SpringCache注解@Cacheable的九个属性详解》在@Cacheable注解的使用中,共有9个属性供我们来使用,这9个属性分别是:value、cacheNames、key、key... 目录1.value/cacheNames 属性2.key属性3.keyGeneratjavascriptor

Spring Boot 事务详解(事务传播行为、事务属性)

《SpringBoot事务详解(事务传播行为、事务属性)》SpringBoot提供了强大的事务管理功能,通过@Transactional注解可以方便地配置事务的传播行为和属性,本文将详细介绍Spr... 目录Spring Boot 事务详解引言声明式事务管理示例编程式事务管理示例事务传播行为1. REQUI

使用WPF实现窗口抖动动画效果

《使用WPF实现窗口抖动动画效果》在用户界面设计中,适当的动画反馈可以提升用户体验,尤其是在错误提示、操作失败等场景下,窗口抖动作为一种常见且直观的视觉反馈方式,常用于提醒用户注意当前状态,本文将详细... 目录前言实现思路概述核心代码实现1、 获取目标窗口2、初始化基础位置值3、创建抖动动画4、动画完成后