Skip to content

Instantly share code, notes, and snippets.

@protspace
Created July 6, 2018 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save protspace/1313037692b8a359b1458e77b3ffbcca to your computer and use it in GitHub Desktop.
Save protspace/1313037692b8a359b1458e77b3ffbcca to your computer and use it in GitHub Desktop.
import UIKit
extension UIView {
class func animate(_ animation: @autoclosure @escaping () -> Void, duration: TimeInterval = 0.25, delay: TimeInterval = 0) {
UIView.animate(withDuration: duration, delay: delay, animations: animation)
}
}
UIView.animate(self.label.alpha = 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment