Skip to content

Instantly share code, notes, and snippets.

@JFSene
Created October 4, 2017 16:35
Show Gist options
  • Save JFSene/90ca35d10ce2f2fff53b7d7596cab39e to your computer and use it in GitHub Desktop.
Save JFSene/90ca35d10ce2f2fff53b7d7596cab39e to your computer and use it in GitHub Desktop.
Pulse Animation
func animationScaleEffect(view:UIView,animationTime:Float) {
UIView.animateWithDuration(NSTimeInterval(animationTime), animations: {
view.transform = CGAffineTransformMakeScale(0.6, 0.6)
},completion:{completion in
UIView.animateWithDuration(NSTimeInterval(animationTime), animations: { () -> Void in
view.transform = CGAffineTransformMakeScale(1, 1)
})
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment