Foundation.NSObservedChange Class
Changes that ocurred to an object being observed by Key-Value-Observing

See Also: NSObservedChange Members

Syntax

public class NSObservedChange

Remarks

This class exposes the various components that were changes in a Key-Value-Observed property.

These are merely accessors to the underlying NSDictionary that is provided to the NSObject.ObserveValue method.

Instances of this class are provided to your callback methods that you provide to NSObject.AddObserver.

You can also create these objects if you have a dictionary that contains the keys from a key-value-observing change.   For example if you override the Foundation.NSObject.ObserveValue method.

C# Example

class MyObserved : NSObject {
    public override ObserveValue (NSString keyPath, NSObject ofObject, NSDictionary change, IntPtr context)
    {
        var change = new NSObservedChange (change);
        // Now you can access the details about the change with the
        // properties in the `change’ variable.

        if (context == MyObservedContext){
            //...
        }
        base.ObserveValue (keyPath, ofObject, change, context);
    }
}

Requirements

Namespace: Foundation
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0