Animate 0.1.6

Animate 0.1.6

测试已测试
语言语言 SwiftSwift
许可 MIT
发布最新发布2015年10月
SPM支持SPM

SelfStudio维护。




Animate 0.1.6

Animate

Swift编写的Pop动画框架的便利工具

屏幕截图

用法

要运行示例项目,克隆仓库,首先从示例目录运行pod install

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)

要求

iOS 8.0或更高版本

安装

Animate可通过CocoaPods获取。安装它,只需将以下行添加到Podfile中:

pod "Animate"

待办事项

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

作者

CodeEagle, [email protected]

许可

Animate可在MIT许可下使用。有关更多信息,请参阅LICENSE文件。