Created
December 7, 2016 19:02
-
-
Save wh1pch81n/c07b5421a8aa77fa9f564d74261a554d to your computer and use it in GitHub Desktop.
using Currying on UIView Animation
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
public class func animation(withDuration duration: TimeInterval) -> (@escaping () -> ()) -> (@escaping (Bool) -> ()) -> Void { | |
return { (animations: @escaping () -> ()) in | |
return { (completion: @escaping (Bool) -> ()) in | |
UIView.animate(withDuration: duration, animations: animations, completion: completion) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment