Latest 0.2.0
Homepage https://github.com/anatoliyv/LikeAnimation
License MIT
Platforms ios 9.0
Frameworks UIKit
Authors

Like Animation for iOS

LikeAnimation

CI Status
Version
License
Platform

Like animation (heart beating):

  • [x] Easy to add to your project
  • [x] Customizable colors
  • [x] Customizable particles
  • [x] Has delegation to handle willBegin and didEnd events

Example

To run the example project, clone the repo, and run pod install from the Example directory first to select best
properties suitable for your project.

Requirements

Swift 3 and iOS 9.0

Installation

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

pod "LikeAnimation"

Usage

Create an animation.

let likeAnimation = LikeAnimation(frame: CGRect(origin: yourPlaceholderView, size: CGSize(width: 100, height: 100)))

Customize duration to 1.5 seconds.

likeAnimation.duration = 1.5

Customize particles counters.

likeAnimation.circlesCounter = 1            // One cirlce
likeAnimation.particlesCounter.main = 6     // 6 big particles
likeAnimation.particlesCounter.small = 7    // 7 particles between big particles

Customize colors if required. Default fill color is white for all elements.

likeAnimation.heartColors.initial = .white
likeAnimation.heartColors.animated = .orange
likeAnimation.particlesColor = .orange

Set delegate methods:

likeAnimation.delegate = self

in your delegate implementation

func likeAnimationWillBegin(view: LikeAnimation) {
    print("Like animation will start")
}

func likeAnimationDidEnd(view: LikeAnimation) {
    print("Like animation ended")
}

Run

likeAnimation.run()

Project using LikeAnimation

Using LikeAnimation in you project? Make a pull request to add your app to this list.

Author

License

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

Latest podspec

{
    "name": "LikeAnimation",
    "version": "0.2.0",
    "summary": "Beautifule heart beating animation for iOS written in Swift",
    "description": "Customizable like animation aka heart beating written in Swift.",
    "homepage": "https://github.com/anatoliyv/LikeAnimation",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Anatoliy Voropay": "[email protected]"
    },
    "source": {
        "git": "https://github.com/anatoliyv/LikeAnimation.git",
        "tag": "0.2.0"
    },
    "social_media_url": "https://twitter.com/anatoliy_v",
    "frameworks": "UIKit",
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "LikeAnimation/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This