MonoMac.Foundation.NSNotificationCenter.AddObserver Method
Adds an observer for the specified notification

Syntax

[System.Obsolete("Use AddObserver(NSString, Action<NSNotification>) instead")]
public NSObject AddObserver (string aName, Action<NSNotification> notify)

Parameters

aName
The name of the notification to observe.
notify
The delegate that will be invoked when the notification is posted.

Returns

An observer token that can be used later as the parameter passed to RemoveObserver (NSObject observer).

Remarks

Use this overload if you are using a C# string. Usually you would be using an NSString constant using the pattern ClassName.SomeNotification.

Requirements

Namespace: MonoMac.Foundation
Assembly: XamMac (in XamMac.dll)
Assembly Versions: 0.0.0.0