samhuri.net-ios/Pods/PromiseKit/objc/NSNotificationCenter+PromiseKit.h

31 lines
884 B
Objective-C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#import <Foundation/NSNotification.h>
#import <PromiseKit/fwd.h>
/**
To import the `NSNotificationCenter` category:
pod "PromiseKit/NSNotificationCenter"
Or you can import all categories on `Foundation`:
pod "PromiseKit/Foundation"
Or `NSNotificationCenter` is one of the categories imported by the umbrella pod:
pod "PromiseKit"
*/
@interface NSNotificationCenter (PromiseKit)
/**
Observe the named notification once.
@warning *Important* Promises only resolve once. If you need your block to execute more than once then use `-addObserverForName:object:queue:usingBlock:`.
@param notificationName The name of the notification for which to register the observer.
@returns A promise that fulfills with two parameters:
1. The NSNotification object.
2. The NSNotifications userInfo property.
*/
+ (PMKPromise *)once:(NSString *)notificationName;
@end