MonobjcMonobjc Documented Class Library
AddObserverSelectorNameObject Method (notificationObserver, notificationSelector, notificationName, notificationSender)
NamespacesMonobjc.FoundationNSNotificationCenterAddObserverSelectorNameObject(Id, IntPtr, NSString, Id)

Adds an entry to the receiver’s dispatch table with an observer, a notification selector and optional criteria: notification name and sender.

Original signature is '- (void)addObserver:(id)notificationObserver selector:(SEL)notificationSelector name:(NSString *)notificationName object:(id)notificationSender'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual void AddObserverSelectorNameObject(
	Id notificationObserver,
	IntPtr notificationSelector,
	NSString notificationName,
	Id notificationSender
)
Public Overridable Sub AddObserverSelectorNameObject ( _
	notificationObserver As Id, _
	notificationSelector As IntPtr, _
	notificationName As NSString, _
	notificationSender As Id _
)
public:
virtual void AddObserverSelectorNameObject(
	Id^ notificationObserver, 
	IntPtr notificationSelector, 
	NSString^ notificationName, 
	Id^ notificationSender
)
Parameters
notificationObserver (Id)
Object registering as an observer. This value must not be nil.
notificationSelector (IntPtr)
Selector that specifies the message the receiver sends notificationObserver to notify it of the notification posting. The method specified by notificationSelector must have one and only one argument (an instance of NSNotification).
notificationName (NSString)
The name of the notification for which to register the observer; that is, only notifications with this name are delivered to the observer.
notificationSender (Id)
The object whose notifications the observer wants to receive; that is, only notifications sent by this sender are delivered to the observer.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.Foundation (Module: Monobjc.Foundation)