Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define listenToNotification$withCallBack(notification, callback) \
- CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), \
- self, \
- &callback, \
- CFSTR(notification), \
- NULL, \
- CFNotificationSuspensionBehaviorHold);
- //example:
- listenToNotification$withCallBack("com.homeschooldev.enabledswitch", &callback)
- static void callback(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) {
- }
Add Comment
Please, Sign In to add comment