Skip to content

Instantly share code, notes, and snippets.

@Bensge
Bensge / gist:a26e5c645580f5cf64db
Created August 19, 2014 19:47
Macro for short main thread dispatch in Objective-C
#define DISMAIN( CODE ) \
do { \
dispatch_sync(dispatch_get_main_queue(), ^{ \
CODE \
}); \
} while (0)
@Bensge
Bensge / gist:bd9067ebb7959a4cee6b
Last active August 29, 2015 14:03
notify_post 7.1 bug quick fix
#define notify_post(STRING) CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR(#STRING), NULL, NULL, TRUE)