Latest 0.0.2
Homepage https://github.com/LucaGobbo/MinuteAnimations
License MIT
Platforms ios 9.0
Frameworks UIKit
Authors

CI Status
Version
License
Platform

Simplfy animations with some sugar. This is a small library i personally use for my projets at my work.

inspired by this medium post

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Animator Examples

  constraint.constant = 100
  UIView.Animator(duration: animation.duration)
    .animations { self.view.layoutIfNeeded() }
    .animate()
  constraint.constant = 100
  UIView.Animator(duration: animation.duration)
    .animations { self.view.layoutIfNeeded() }
    .completion { self.animationCompleted() }
    .animate()

KeyFrameAnimator example

  UIView.KeyFrameAnimator(duration: 0.6)      
    .addAnimation(relativeStartTime: 0, relativeDuration: 0.5) {        
      label.alpha = 0
      button.transform = CGAffineTransform.identity.scaledBy(x: 0.1, y: 0.1)
    }
    .addAnimation(relativeStartTime: 0.5, relativeDuration: 0.3) {
      imageView.transform = CGAffineTransform.identity.scaledBy(x: 1.2, y: 1.2)
      imageView.alpha = 1
    }
    .addAnimation(relativeStartTime: 0.8, relativeDuration: 0.2) {
      imageView.transform = CGAffineTransform.identity
    }
    .animate()

Requirements

Installation

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

pod "MinuteAnimations"

Author

Luca Gobbo, [email protected]

License

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

Latest podspec

{
    "name": "MinuteAnimations",
    "version": "0.0.2",
    "summary": "Simple Animation sugar",
    "description": "Simplfy animations with some sugar. This is a small library i personally use for my projets at my work.",
    "homepage": "https://github.com/LucaGobbo/MinuteAnimations",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Luca Gobbo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/LucaGobbo/MinuteAnimations.git",
        "tag": "0.0.2"
    },
    "social_media_url": "https://twitter.com/lucagobbo",
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "MinuteAnimations/Classes/**/*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This