Animate 0.1.6

Animate 0.1.6

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Oct 2015
SPMSupports SPM

Maintained by SelfStudio.




Animate 0.1.6

Animate

Convenience tool for the Pop animation framework written in Swift

Screenshot

Usage

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

import Animate

var view:UIView! = UIView(frame: CGRectMake(10, 10, 50, 50))
view.backgroundColor = UIColor.orangeColor()
self.view.addSubview(view)
view.basic { (make) -> Void in
                make.backgroundColor = UIColor.grayColor()
                make.center = CGPointMake(200, 200)
            }.delay(1)
            .spring({ (make) -> Void in
                make.backgroundColor = UIColor.orangeColor()
                make.center = CGPointMake(200, 300)
            }).delay(1)
            .decay({ (make) -> Void in
                make.velocity(NSValue(CGPoint:CGPointMake(150, 150)),forProperty:kPOPViewCenter)
                make.velocity(NSValue(CGRect:CGRectMake(0, 0, 200, 200)),forProperty:kPOPViewBounds)
            }).delay(1)
            .done { () -> Void in
                view.removeFromSuperview()
                view = nil
            }


//or

view.spring.frame =  CGRectMake(0, 0, 200, 200)

Requirements

iOS 8.0 or later

Installation

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

pod "Animate"

Todo Next

  • [x] UIView Support
  • [x] CALayer Support
  • [ ] CAShapeLayer Support
  • [ ] NSLayoutConstraint Support
  • [ ] UIScrollView Support
  • [ ] UITableView Support
  • [ ] UICollectionView Support
  • [ ] UINavigationBar Support
  • [ ] UIToolbar Support
  • [ ] UITabBar Support
  • [ ] UILabel Support

Author

CodeEagle, [email protected]

License

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