NSObject.SetValueForKeyPath Method

Definition

Overloads

Name Description
SetValueForKeyPath(NSObject, NSString)
SetValueForKeyPath(NativeHandle, NSString)

Sets the value for the property identified by a given key path to a given value.

SetValueForKeyPath(NSObject, NSString)

[Foundation.Export("setValue:forKeyPath:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public virtual void SetValueForKeyPath(Foundation.NSObject value, Foundation.NSString keyPath);
[<Foundation.Export("setValue:forKeyPath:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
abstract member SetValueForKeyPath : Foundation.NSObject * Foundation.NSString -> unit
override this.SetValueForKeyPath : Foundation.NSObject * Foundation.NSString -> unit

Parameters

value
NSObject
keyPath
NSString
Attributes

Applies to

SetValueForKeyPath(NativeHandle, NSString)

Sets the value for the property identified by a given key path to a given value.

public void SetValueForKeyPath(ObjCRuntime.NativeHandle handle, Foundation.NSString keyPath);
member this.SetValueForKeyPath : ObjCRuntime.NativeHandle * Foundation.NSString -> unit

Parameters

handle
NativeHandle

A handle to the value to set.

keyPath
NSString

A key path of the form relationship.property (with one or more relationships); for example "department.name" or "department.manager.lastName".

Remarks

This method is useful for setting a value for a property that can be reached by following a key path. The key path is a series of property names separated by periods.

Applies to