init(for:contentType:encoder:decoder:)
Creates a transfer representation for a given type with the encoder and decoder you supply.
Declaration
init(for itemType: Item.Type = Item.self, contentType: UTType, encoder: Encoder, decoder: Decoder)Parameters
- itemType:
The concrete type of the item that’s being transported.
- contentType:
A uniform type identifier that best describes the item.
- encoder:
An instance of a type that can convert the item being transferred into binary data with a specific structure.
- decoder:
An instance of a type that can convert specifically structured binary data into the item being transferred.