UnsafeSourceObject

public final class UnsafeSourceObject

The read-only proxy object used for the source object in a mapping’s Transformer closure. Properties can be accessed either by keyPath string or by NSAttributeDescription.

  • Accesses the property value via its keyPath.

    Declaration

    Swift

    public subscript(attribute: KeyPathString) -> Any? { get }
  • Accesses the property value via its NSAttributeDescription, which can be accessed from the enumerateAttributes(_:) method.

    Declaration

    Swift

    public subscript(attribute: NSAttributeDescription) -> Any? { get }
  • Enumerates the all NSAttributeDescriptions. The attribute argument can be used as the subscript key to access the property.

    Declaration

    Swift

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