Fixed animation slightly

This commit is contained in:
Alexander Munch-hansen 2017-08-01 13:44:48 +02:00
parent e4738a306e
commit dba18dd5d7

View File

@ -56,12 +56,16 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP
@IBAction func onSaveButton(_ sender: Any) {
UIImageWriteToSavedPhotosAlbum(imageView.image!, nil, nil, nil);
UIView.animate(withDuration: 0.5, delay:0.0, options:UIViewAnimationOptions.transitionFlipFromTop, animations: {
self.savedPhotoImageView.isHidden = false
self.savedPhotoImageView.alpha = 0
self.savedPhotoImageView.isHidden = false
UIView.animate(withDuration: 0.3, delay:0.0, options:UIViewAnimationOptions.transitionCrossDissolve, animations: {
self.savedPhotoImageView.alpha = 1
}, completion: { finished in
UIView.animate(withDuration: 0.5, delay:1, options:UIViewAnimationOptions.transitionCrossDissolve, animations: {
UIView.animate(withDuration: 0.3, delay:1, options:UIViewAnimationOptions.transitionCrossDissolve, animations: {
self.savedPhotoImageView.alpha = 0
}, completion: { finished in