Last active
December 2, 2017 19:50
-
-
Save bouchtaoui-dev/55d8b003502b79d66329aa80758f0a42 to your computer and use it in GitHub Desktop.
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
| // This one I use very often | |
| dispatch_async(dispatch_get_main_queue(), ^{ | |
| // run following code in main queue | |
| // this block will be put in the queue to be executed later | |
| }); | |
| dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ | |
| // do some task in background | |
| dispatch_async(dispatch_get_main_queue(), ^{ | |
| // update some UI | |
| }); | |
| }); | |
| // Need some more examples | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment