Latest0.5.1
Homepagehttps://github.com/shu223/Pulsator
LicenseMIT
Platformsios 8.0, osx 10.9, requires ARC
Authors

Badge w/ Version
Carthage compatible
License
Twitter

Pulse animation for iOS written with Swift.

Pulsator

Great For:

  • Pulses of Bluetooth, BTLE, 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!

let pulsator = Pulsator()
view.layer.addSublayer(pulsator)
pulsator.start()

Customizations

Number of Pulses

Use numPulse property.

pulsator.numPulse = 3

Radius

Use radius property.

pulsator.radius = 240.0

Color

Just set the backgroundColor property.

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.

You can use Pulsator also with Objective-C.

#import "Pulsator-Swift.h"

Author

Shuichi Tsutsumi

iOS freelancer in Japan. Welcome works from abroad!

Latest podspec

{
    "name": "Pulsator",
    "version": "0.5.1",
    "summary": "Pulse animation for iOS.",
    "homepage": "https://github.com/shu223/Pulsator",
    "screenshots": "https://github.com/shu223/Pulsator/blob/master/demo.gif?raw=true",
    "license": "MIT",
    "authors": {
        "shu223": "[email protected]"
    },
    "source": {
        "git": "https://github.com/shu223/Pulsator.git",
        "tag": "0.5.1"
    },
    "social_media_url": "https://twitter.com/shu223",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9"
    },
    "requires_arc": true,
    "source_files": "Pulsator/Pulsator.swift",
    "ios": {
        "frameworks": [
            "UIKit",
            "QuartzCore"
        ]
    },
    "osx": {
        "frameworks": [
            "Cocoa",
            "QuartzCore"
        ]
    }
}

Pin It on Pinterest

Share This