美文网首页
【IOS】雷达中心扩散效果

【IOS】雷达中心扩散效果

作者: 雨影 | 来源:发表于2017-11-08 09:23 被阅读180次

UIImageView *imageView =[WJDControl createImageViewWithFrame:self.bounds ImageName:@"yuan"];

[self addSubview:imageView];

UIImageView *centerImageView =[WJDControl createImageViewWithFrame:CGRectMake(0, 0, 33, 33) ImageName:@"user_location"];

centerImageView.center = imageView.center;

[self addSubview:centerImageView];

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

opacityAnimation.fromValue = [NSNumber numberWithFloat:1.0];

opacityAnimation.toValue = [NSNumber numberWithFloat:0.0];

opacityAnimation.duration = 2.0f;

opacityAnimation.autoreverses= NO;

opacityAnimation.repeatCount = MAXFLOAT;

//    opacityAnimation.speed = 1.0f;

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

animation2.fromValue = [NSNumber numberWithDouble:0];

animation2.toValue = [NSNumber numberWithDouble:1];

animation2.duration= 2.0;

animation2.autoreverses= NO;

animation2.repeatCount= FLT_MAX;  //"forever"

 animation2.removedOnCompletion= YES;

[imageView.layer addAnimation:animation2 forKey:@"scale"];

  [imageView.layer addAnimation:opacityAnimation forKey:nil];

相关文章

  • 【IOS】雷达中心扩散效果

  • 关于一些自定义控件的记录

    一个三环评分控件 效果: 代码: 一个中心扩散雷达 控件 效果 代码 一个 带分数的进度条 自定义控件 效果: 代...

  • Android 开源控件

    扩散圆 简介 扩散效果支持:圆形,圆环 扩散圆支持:正圆,椭圆 中心圆支持:图片,正圆,椭圆 属性列表 效果展示 ...

  • iOS雷达效果

    这段时间新app开始了,有个产品需求是做一个类似如下效果的雷达图: 中间的图片是用户头像,然后需要展示一个雷达扫描...

  • 雷达波/支付宝咻咻咻/水波扩散效果

    最近UI给了个产品图,大致效果就是类似 " 雷达波 " 或者 " 支付宝的咻咻咻 " 那个扩散效果,看到UI的第一...

  • iOS 精美过度动画源码、网络音乐播放器源码、雷达图源码等

    iOS精选源码 构建自己的条形图的方法 适用于iOS的雷达图表效果 ios Bluetooth ble 蓝牙开发 ...

  • iOS 雷达扫描效果

    最近闲的时候实现了一个雷达扫描的效果效果如下图 前言 swift 3.0 实现 了解 Layer anchorPo...

  • iOS雷达波浪效果

    好久不见 有一项目有这么一个需求,当定位信号离开某个区域时,要把这个信号列为告警信号,并且要用相应的标志标记此信号...

  • 雷达动画效果

    项目中有用到关于雷达扩散的那种动画效果,研究了下,在这里分享一下。直接上demo源码。 当然了,还有代理方法 效果...

  • iOS动画-扩散波纹效果

    最终效果 实现思路 动画的表现形式是颜色以及大小的变化,整体效果可以看做多个单独的波纹效果的叠加。因此我们可以创建...

网友评论

      本文标题:【IOS】雷达中心扩散效果

      本文链接:https://www.haomeiwen.com/subject/isrjkxtx.html