Skip to content

Instantly share code, notes, and snippets.

@agammahajan1
Last active December 29, 2019 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agammahajan1/fb5165017bbc99cec45fe65d60c5e21b to your computer and use it in GitHub Desktop.
Save agammahajan1/fb5165017bbc99cec45fe65d60c5e21b to your computer and use it in GitHub Desktop.
private func addAnimation(firstImageView: UIImageView, secondImageView: UIImageView) {
let basicAnimation1 = getBasicAnimation(withInitialPostion: centerPosition, finalPos: finalPosition)
firstImageView.layer.add(basicAnimation1, forKey: "position")
let basicAnimation2 = self.getBasicAnimation(withInitialPostion: self.initalPosition, finalPos: self.centerPosition)
secondImageView.layer.add(basicAnimation2, forKey: "position")
self.addNextImage(forImageView: firstImageView)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment