Demo iOS app showing button animation
Clone or download
Evgenii Neumerzhitckii
Evgenii Neumerzhitckii Update to Swift 3
Latest commit fe06c4b Oct 7, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
images Add image source Aug 16, 2014
spring-button-demo.xcodeproj Update to Swift 3 Oct 7, 2016
spring-button-demo Update to Swift 3 Oct 7, 2016
spring-button-demoTests Update to Swift 3 Oct 7, 2016
.gitignore Initial commit Aug 16, 2014 Update to Swift 3 Oct 7, 2016

Bubble button animation demo iOS app

This demo app shows how to apply spring style animation to a button.

Animation is done by setting Scale transform to the button inside animation block. This demo app allows to tweak duration, damping and velocity parameters of the animation function.

button.transform = CGAffineTransform(scaleX: 0.1, y: 0.1)

UIView.animate(withDuration: 2.0,
  delay: 0,
  usingSpringWithDamping: 0.2,
  initialSpringVelocity: 6.0,
  options: .allowUserInteraction,
  animations: { [weak self] in
    self?.button.transform = .identity
  completion: nil)

Button animation iOS

iOS animate button demo with Swift


The Large Bubble Sound clip is taken from and recorded by snottyboy.