Last active
September 15, 2015 02:24
-
-
Save romainmenke/9f6aee5601adac4bac35 to your computer and use it in GitHub Desktop.
This file contains 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 highLight(string : String, completion: (finished: Bool) -> Void) { | |
let qualityOfServiceClass = QOS_CLASS_DEFAULT | |
let backgroundQueue = dispatch_get_global_queue(qualityOfServiceClass, 0) | |
dispatch_async(backgroundQueue) { () -> Void in | |
// actual syntax highlighting here | |
dispatch_sync(dispatch_get_main_queue()) { () -> Void in | |
completion(finished: true) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment