UnsafeDestinationObject
public final class UnsafeDestinationObject
The read-write proxy object used for the destination object that can be created in a mapping’s Transformer
closure. Properties can be accessed and mutated either through keyPath string or by NSAttributeDescription
.
-
Accesses or mutates the property value via its keyPath.
Declaration
Swift
public subscript(attribute: KeyPathString) -> Any? { get set }
-
Accesses or mutates the property value via its
NSAttributeDescription
, which can be accessed from theenumerateAttributes(_:)
method.Declaration
Swift
public subscript(attribute: NSAttributeDescription) -> Any? { get set }
-
Enumerates the all
NSAttributeDescription
s. Theattribute
argument can be used as the subscript key to access and mutate the property. ThesourceAttribute
can be used to access properties from the sourceUnsafeSourceObject
.Declaration
Swift
public func enumerateAttributes(_ closure: (_ attribute: NSAttributeDescription, _ sourceAttribute: NSAttributeDescription?) -> Void)