Skip to content

Instantly share code, notes, and snippets.

@webmd-ios
Created October 1, 2017 22:08
Show Gist options
  • Save webmd-ios/f95b9e5e20a0d0458a4237b49b337145 to your computer and use it in GitHub Desktop.
Save webmd-ios/f95b9e5e20a0d0458a4237b49b337145 to your computer and use it in GitHub Desktop.
@interface GenericNotification<__covariant KEYTYPE: NSString *, VALUETYPE: id, RETURNTYPE: id> : NSObject
- (NSArray<RETURNTYPE> *_Nonnull)broadcastNotificationWithInfo:(NSDictionary<KEYTYPE, VALUETYPE> *_Nullable)info;
- (void)addSubscriber:(NSObject *_Nonnull)subscriber callback:(RETURNTYPE _Nullable(^_Nonnull)(NSDictionary<KEYTYPE, VALUETYPE> *_Nullable info))callback;
- (void)removeSubscriber:(id _Nonnull)subscriber;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment