微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Pulsing Halo <a href="https://github.com/shu223/PulsingHalo#radius"></a>半径<a href="https://github.com/shu223/PulsingHalo#color"></a>颜色<a href="https://github.com/ 视图变换工具

程序名称:Pulsing Halo <a href="https://github.com/shu223/PulsingHalo#radius"></a>半径<a href="https://github.com/shu223/PulsingHalo#color"></a>颜色<a href="https://github.com/

授权协议: MIT

操作系统: iOS

开发语言: Objective-C

Pulsing Halo <a href="https://github.com/shu223/PulsingHalo#radius"></a>半径<a href="https://github.com/shu223/PulsingHalo#color"></a>颜色<a href="https://github.com/ 介绍

Pulsing Halo是CALayer的子集。

It is useful for:

  • iBeacon
  • annotions in MapKit

用法

  1. 在你的项目中加入PulsingHaloLayer.h,m ;
  2. 初始化然后添加到你的视图;

    PulsingHaloLayer *halo = [PulsingHaloLayer layer];
    halo.position = self.view.center;
    [self.view.layer addSublayer:halo];

自定义设置

半径

使用半径属性

self.halo.radius = 240.0;

颜色

使用背景颜色属性

UIColor *color = [UIColor colorWithRed:0.7
                                 green:0.9
                                  blue:0.3
                                 alpha:1.0];

self.halo.backgroundColor = color.CGColor;

动画周期:

使用动画周期或者脉冲间隔属性

样板

你可以尝试修改样板app里面的半径和颜色:

Pulsing Halo <a href="https://github.com/shu223/PulsingHalo#radius"></a>半径<a href="https://github.com/shu223/PulsingHalo#color"></a>颜色<a href="https://github.com/ 官网

https://github.com/shu223/PulsingHalo

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐