Skip to content

Instantly share code, notes, and snippets.

@vigneshr89
Created August 30, 2016 20:14
Show Gist options
  • Save vigneshr89/7d4b16f1fa20310e1935281a4a696cf9 to your computer and use it in GitHub Desktop.
Save vigneshr89/7d4b16f1fa20310e1935281a4a696cf9 to your computer and use it in GitHub Desktop.
UIView.animateKeyframesWithDuration(0.6, delay: 0.0, options: UIViewKeyframeAnimationOptions.CalculationModeLinear, animations: {
UIView.setAnimationRepeatCount(3);
self.myconstraint.constant = 40
UIView.addKeyframeWithRelativeStartTime(0.0, relativeDuration: 0.3, animations: {
self.view.layoutIfNeeded()
})
self.myconstraint.constant = 30
UIView.addKeyframeWithRelativeStartTime(0.3, relativeDuration: 0.3, animations: {
self.view.layoutIfNeeded()
})
}, completion: nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment