Created
May 23, 2017 10:35
-
-
Save jonathanduty/8650f28cea40e680cb919a7a7dfb66e5 to your computer and use it in GitHub Desktop.
onMainThread
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
| func onMainThread(_ block: @escaping () -> Void) { | |
| DispatchQueue.main.async { | |
| block() | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment