Skip to content

CodeEagle/Animate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Animate

Convenience tool for the Pop animation framework written in Swift

Version License Platform

##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

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

Author

CodeEagle, stasura@hotmail.com

License

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

About

Convenience tool for the Pop animation framework written in Swift

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors