Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void OnMainThread(dispatch_block_t block)
- {
- if (!block)
- return;
- else if ([NSThread isMainThread])
- block();
- else
- dispatch_async(dispatch_get_main_queue(), block);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement