zoukankan      html  css  js  c++  java
  • CABasicAnimation动画及其keypath值和作用

    //tarnsform放大缩小动画
    
    CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];//根据传的keypath实现不同动画
    
    animation.duration = 0.3f;
    
    animation.repeatCount = 0;
    
    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

    ...
  • 相关阅读:
    三、checkedListBoxControl
    三、安装MyCat-Web
    三、zookeeper安装
    二、.Net 连接mycat
    一、MyCat的搭建
    二、优惠卷
    二、Docker部署应用
    【2019-05-08】感知当下
    【一句日历】2019年7月
    【读书】2019
  • 原文地址:https://www.cnblogs.com/liuluoxing/p/5765089.html
Copyright © 2011-2022 走看看