Skip to content

omiz/Pulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pulse

Animated Pulse layer and view

Expermintal

this is an expermintal repo and will be updated soon. you feedback is welcome.

Screenshot

Alt text

Requirements

  • iOS 8.0+
  • Xcode 8.0+
  • Swift 3.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate Pulse into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

#https://github.com/omiz/Pulse
pod 'Pulse', '~> 1.0'

Then, run the following command:

$ pod install

Manually

If you prefer not to use CocoaPods dependency manager, you can integrate Pulse into your project manually.

Copy the .swift files into your project or clone and include Pulse repo into your project

Usage

To use the layer:

    let pulseLayer = PulseLayer()
    pulseLayer.position = view.center
    pulseLayer.count = 10
    view.layer.addSublayer(pulseLayer)
    pulseLayer.animate()
    
    //when needed
    //pulseLayer.stop()

To use the view:

Directly in the layout builder:

Enjoy the Inspectable parameters

Programmatically:

    let pulseView = PulseView(frame: frame)
    pulseView.count = 10
    pulseView.color = UIColor.blue
    view.addSubview(pulseView)
    pulseView.isAnimating = true
    
    //when needed
    //pulseView.isAnimating = false

Todo

  • Submit to CocoaPods
  • Add demo
  • your suggestions

License

MIT