项目作者: bluelocate

项目描述 :
Esay to use pulse animation Button
高级语言: Swift
项目地址: git://github.com/bluelocate/RNPulseButton.git
创建时间: 2017-12-30T15:04:22Z
项目社区:https://github.com/bluelocate/RNPulseButton

开源协议:MIT License

下载


RNPulseButton

Platform
Swift
Version
License

Easy and Customizable iOS Pulse Animation Effect.
You can connect Action(TouchUpInside) in storyboard(Like UIButton).

Demo

Example gif

Installation

RNPulseButton is available through CocoaPods. To install
it, simply add the following line to your Podfile:

  1. pod 'RNPulseButton'

At a Glance

Create Cusom Pulse

StoryBoard : Just make it! Adjust property from storyboard inspector

Programmatically

  1. let pulse2 = RNPulseButton(frame: CGRect(x: 150, y: 300, width: 100, height: 100),
  2. pulseRadius: 100,
  3. pulseCount: 4,
  4. pulseDuration: 3,
  5. intervalTime: 0.4,
  6. scaleFactor: 3,
  7. repeatCount: 100,
  8. pulseColor: UIColor.red,
  9. normalImage: nil, selectedImage: nil)

Animation Start

  1. pulse2.start()

Animation Stop

  1. pulse2.stop()

Customizable Property

  1. pulseRadius: Double // Pulse Radius
  2. pulseCount: Int // Number of Pulse
  3. pulseDuration: Double // Pulse Animation Duration
  4. intervalTime: Double // Interval between Pulse
  5. scaleFactor: CGFloat // Pulse Radius Scale Factor
  6. repeatCount: Int // Animation Repeat Count
  7. pulseColor: UIColor // Set Pulse Color
  8. normalImage: UIImage? // (Optional) Set Normal State Image
  9. selectedImage: UIImage? // (Optional) Set Selected State Image

Author

Rodo, planon21@gmail.com

License

RNPulseButton is available under the MIT license. See the LICENSE file for more info.