Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pffan91/587f3f2033b93fa253a52c46fe64fdba to your computer and use it in GitHub Desktop.
Save pffan91/587f3f2033b93fa253a52c46fe64fdba to your computer and use it in GitHub Desktop.
DecomposingViewControllerAnimations_FinalAnimationClass
// 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