Use SnapKit with the Facebook Pop animation framework. Inspired from MSSPopMasonry
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
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")