Created
April 9, 2017 17:56
-
-
Save pffan91/587f3f2033b93fa253a52c46fe64fdba to your computer and use it in GitHub Desktop.
DecomposingViewControllerAnimations_FinalAnimationClass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Created by Vladyslav Semenchenko on 09/04/2017. | |
// Copyright © 2017 Vladyslav Semenchenko. All rights reserved. | |
import UIKit | |
class InitialViewControllerAnimations: NSObject { | |
@IBOutlet weak var controlsContainer: UIView! | |
@IBOutlet weak var ivLogoHorizontalConstraint: NSLayoutConstraint! | |
func animateToLoginPresentation() { | |
ivLogoHorizontalConstraint.constant = -150 | |
UIView.animate(withDuration: 0.7, delay: 0.5, options: .curveEaseInOut, animations: { | |
AnimationHelper.currentViewController()?.view.layoutIfNeeded() | |
}) { _ in } | |
UIView.animate(withDuration: 0.3, delay: 1.0, options: .curveLinear, animations: { | |
self.controlsContainer.alpha = 1.0 | |
}) { _ in } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment