• IOS 点击按钮 光环 冲击波效果


    UIBezierPath * path = [UIBezierPath bezierPathWithArcCenter:CGPointMake(00) radius:ROUND_WIDTH/2 -3 startAngle:0 endAngle:2*M_PI clockwise:YES];

        

        CAShapeLayer * layer = [CAShapeLayer layer];

        layer.path = path.CGPath;

        layer.fillColor = [[UIColor clearColor]CGColor];

        layer.strokeColor = [[UIColor orangeColor] CGColor];

        layer.lineCap = kCALineCapRound;

        layer.position = pt;

        layer.lineWidth = 1.5f;

        

        

        CABasicAnimation *scaleAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];

        scaleAnimation.fromValue = [NSValue valueWithCATransform3D:CATransform3DIdentity];

        scaleAnimation.toValue = [NSValue valueWithCATransform3D:CATransform3DMakeScale(551)];

        scaleAnimation.removedOnCompletion = NO;

        scaleAnimation.fillMode = kCAFillModeForwards;

        

        CABasicAnimation *alphaAnimation = [CABasicAnimation animationWithKeyPath:@"opacity"];

        alphaAnimation.fromValue = @1;

        alphaAnimation.toValue = @0;

        alphaAnimation.removedOnCompletion = NO;

        alphaAnimation.fillMode = kCAFillModeForwards;

        

        CAAnimationGroup * group = [CAAnimationGroup animation];

        group.animations = @[scaleAnimation, alphaAnimation];

        group.duration = 1.5;

        group.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut];

        group.delegate = self;

        group.removedOnCompletion = NO;

        group.fillMode = kCAFillModeForwards;

        

        [_bgImgView.layer addSublayer:layer];

        

        [layer addAnimation:group forKey:@""];

        layer = nil;

     

    本文转自  张江论坛  转自请注明~~~~  http://www.999dh.net/home.php?mod=space&uid=1&do=blog&id=409

  • 相关阅读:
    连接mysql慢或者多台服务器ping不通mysql
    java8 Stream
    Idea 提示xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    sublime Text的使用
    BigDecimal 加减乘除 比较大小 setScale(精度处理)
    kubectl 命令
    mac brew命令的使用
    mysql json
    idea open打开项目之后,project里没有目录结构。
    mac 多显示器焦点快速切换
  • 原文地址:https://www.cnblogs.com/rollrock/p/3889426.html
Copyright © 2020-2023  润新知