Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shu223/pulsator
Pulse animation for iOS
https://github.com/shu223/pulsator
animation bluetooth bluetooth-low-energy ibeacon ios map pulse-animation swift
Last synced: 25 days ago
JSON representation
Pulse animation for iOS
- Host: GitHub
- URL: https://github.com/shu223/pulsator
- Owner: shu223
- License: mit
- Created: 2016-04-11T20:52:23.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-30T07:59:06.000Z (6 months ago)
- Last Synced: 2024-05-17T06:01:30.023Z (6 months ago)
- Topics: animation, bluetooth, bluetooth-low-energy, ibeacon, ios, map, pulse-animation, swift
- Language: Swift
- Size: 217 KB
- Stars: 1,409
- Watchers: 24
- Forks: 160
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- fucking-awesome-swift - Pulsator - Pulse animation for iOS. (Libs / Animation)
- awesome-swift - Pulsator - Pulse animation for iOS. (Libs / Animation)
- awesome-swift - Pulsator - Pulse animation for iOS ` 📝 9 months ago ` (Animation [🔝](#readme))
- awesome-swift - Pulsator - Pulse animation for iOS. (Libs / Animation)
README
Pulsator
===========[![Badge w/ Version](http://cocoapod-badges.herokuapp.com/v/Pulsator/badge.png)](http://cocoadocs.org/docsets/Pulsator)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat
)](http://mit-license.org)
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/shu223)Pulse animation for iOS written with Swift.
![](demo.gif)
Great For:- **Pulses of Bluetooth, BLE, beacons (iBeacon)**, etc.
- Map Annotations## Installation
### CocoaPods
Add into your Podfile.
```:Podfile
pod "Pulsator"
```Then `$ pod install`
### Carthage
Add into your Cartfile.
```:Cartfile
github "shu223/Pulsator"
```Then `$ carthage update`
## How to use
Just **3 lines**!
Initiate and add to your view's layer, then call `start`!
```swift
let pulsator = Pulsator()
view.layer.addSublayer(pulsator)
pulsator.start()
```## Customizations
### Number of Pulses
Use `numPulse` property.
```swift
pulsator.numPulse = 3
```### Radius
Use `radius` property.
```swift
pulsator.radius = 240.0
```### Color
Just set the `backgroundColor` property.
```swift
pulsator.backgroundColor = UIColor(red: 1, green: 1, blue: 0, alpha: 1).cgColor
```### Animation Duration
Use following properties
- `animationDuration` : duration for each pulse
- `pulseInterval` : interval between pulses### Easing
You can set the `timingFunction` property.
### Repeat
Use `repeatCount` property.
## Demo
You can try to change the `radius`, `backgroundColor` or other properties with the demo app.
- Example/PulsatorDemo.xcodeproj
## macOS support
Add into your Podfile, then run `pod install`.
```:Podfile
platform :osx, '10.9'target 'Pulsator' do
use_frameworks!
pod "Pulsator"
end
```The usage is same as iOS.
```swift
let pulsator = Pulsator()
view.layer?.addSublayer(pulsator)
pulsator.start()
```## Objective-C version
There is an ObjC version, but it's not maintained now.
- https://github.com/shu223/PulsingHalo
You can use Pulsator also with Objective-C.
```
#import "Pulsator-Swift.h"
```## Author
**Shuichi Tsutsumi**
iOS freelancer in Japan. Welcome works from abroad!
- PAST WORKS: [My Profile Summary](https://medium.com/@shu223/my-profile-summary-f14bfc1e7099#.vdh0i7clr)
- PROFILES: [LinkedIn](https://www.linkedin.com/in/shuichi-tsutsumi-525b755b/)
- BLOG: [English](https://medium.com/@shu223/) / [Japanese](http://d.hatena.ne.jp/shu223/)
- CONTACTS:
- [Twitter](https://twitter.com/shu223)
- [Facebook](https://www.facebook.com/shuichi.tsutsumi)