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 the enumerateAttributes(_:) method.

    Declaration

    Swift

    public subscript(attribute: NSAttributeDescription) -> Any? { get set }
  • Enumerates the all NSAttributeDescriptions. The attribute argument can be used as the subscript key to access and mutate the property. The sourceAttribute can be used to access properties from the source UnsafeSourceObject.

    Declaration

    Swift

    public func enumerateAttributes(_ closure: (_ attribute: NSAttributeDescription, _ sourceAttribute: NSAttributeDescription?) -> Void)