Skip to content

Instantly share code, notes, and snippets.

View pffan91's full-sized avatar
🌍
Developing the Future

Vladyslav Semenchenko pffan91

🌍
Developing the Future
View GitHub Profile
@pffan91
pffan91 / DecomposingViewControllerAnimations_CallFunction.swift
Last active April 9, 2017 18:03
DecomposingViewControllerAnimations_CallFunction
// Created by Vladyslav Semenchenko on 09/04/2017.
// Copyright © 2017 Vladyslav Semenchenko. All rights reserved.
// MARK: - Private
func checkUser() {
// some code here and then
InitialViewControllerAnimations.animateLoginPresentation(imageHorizontalConstraint: ivLogoHorizontalConstraint, controlsContainer: controlsContainer)
}
@pffan91
pffan91 / DecomposingViewControllerAnimations_ClassForAnimations.swift
Last active April 9, 2017 17:29
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()
@pffan91
pffan91 / DecomposingViewControllersAnimations_OriginalCode.swift
Created April 9, 2017 17:18
DecomposingViewControllersAnimations_OriginalCode
// Created by Vladyslav Semenchenko on 09/04/2017.
// Copyright © 2017 Vladyslav Semenchenko. All rights reserved.
import UIKit
class InitialViewController: EZViewController {
// MARK: - Variables
@IBOutlet weak var controlsContainer: UIView!