So i have this code:
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0), ^{
//Bunch of code
NSLog(@\"Test\");
});
w
UIKit isn’t thread-safe. Any calls you make that affect your UI need to be made on the main thread, or you’ll get weird, unpredictable behavior. Example:
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// Background code that doesn't need to update the UI here
dispatch_async(dispatch_get_main_queue(), ^{
// UI code here
});
});