NSNotificationCenter(SFAdditions) Category Reference

Declared in NSNotificationCenter+SFAdditions.h

Overview

Posts notifications either once with a run loop, or on the main thread.

+ postNotificationOnceWithName:object:userInfo:

Posts a notification once within a runloop - coalescing on the name.

+ (void)postNotificationOnceWithName:(NSString *)notificationName object:(id)object userInfo:(nullable NSDictionary *)userInfo

Parameters

notificationName

The name of the notification.

object

The object for the new notification.

userInfo

The user information dictionary for the new notification. May be nil.

Declared In

NSNotificationCenter+SFAdditions.h

– postNotificationOnMainThreadWithName:object:userInfo:

Posts a notification on the main thread.

- (void)postNotificationOnMainThreadWithName:(NSString *)notificationName object:(id)object userInfo:(nullable NSDictionary *)userInfo

Parameters

notificationName

The name of the notification.

object

The object for the new notificaiton.

userInfo

The user information dictionary for the new notification. May be nil.

Declared In

NSNotificationCenter+SFAdditions.h