All Projects → kimar → PulsingLayer

kimar / PulsingLayer

Licence: MIT license
Adds a customizable CALayer halo effect to any arbitrary UIView. Completely written in Swift.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

PulsingLayer

Twitter: @Kidmar

Adds a customizable CALayer halo effect to any arbitrary UIView.

Completely written in Swift.

PulsingLayer Animation

How to use

haloLayer = PulsingLayer(pulseColor: UIColor(white: 1.0, alpha: 1.0))
haloLayer.radius = 90.0
haloLayer.animationDuration = 1
haloLayer.pulseInterval = 0
        
haloView = UIView(frame: CGRectMake(65, 65, 50, 50));
haloLayer.position = CGPointMake(CGRectGetWidth(haloView.frame)/2, CGRectGetHeight(haloView.frame)/2)
haloView.layer.addSublayer(haloLayer)

About

Written from Scratch in Swift.

Inspired by PulsingHalo.

License

See LICENSE.md.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].