Skip to content

[deprecated] Use SnapKit with the Facebook Pop animation framework.

License

Notifications You must be signed in to change notification settings

wxxsw/POP-SnapKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

POP-SnapKit

Use SnapKit with the Facebook Pop animation framework. Inspired from MSSPopMasonry

Installation

Embedded frameworks require a minimum deployment target of iOS 8.

To use POP-SnapKit with a project targeting iOS 7, you must to drag POP+SnapKit.swift to your iOS Project.

In your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod "POP+SnapKit"

And in your *.swift:

import POP_SnapKit

Use

circle.snp.makeConstraints { make in
    self.radiusConstaint = make.width.equalTo(self.radius * 2).constraint
}

let spring = POPSpringAnimation(propertyNamed: kPOPLayoutConstraintConstant)
spring.toValue = newValue * 2
self.radiusConstaint?.layoutConstraint?.pop_add(spring, forKey: "someKey")

Dependencies

  • pop (1.0.9) - An extensible iOS and OS X animation library, useful for physics-based interactions.
  • SnapKit (3.0.2) - A Swift Autolayout DSL for iOS & OS X