Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pffan91/0818dc6eaa5c36a021ad278cc2f69286 to your computer and use it in GitHub Desktop.
Save pffan91/0818dc6eaa5c36a021ad278cc2f69286 to your computer and use it in GitHub Desktop.
DecomposingViewControllerAnimations_ClassForAnimations
// Created by Vladyslav Semenchenko on 09/04/2017.
// Copyright © 2017 Vladyslav Semenchenko. All rights reserved.
import UIKit
class InitialViewControllerAnimations: NSObject {
class func animateLoginPresentation(imageHorizontalConstraint: NSLayoutConstraint, controlsContainer: UIView) {
imageHorizontalConstraint.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: {
controlsContainer.alpha = 1.0
}) { _ in }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment