Contents

init(data:)

Creates a data provider that reads from a CFData object.

Declaration

init?(data: CFData)

Parameters

  • data:

    The CFData object to read from.

Return Value

A new data provider. In Objective-C, you’re responsible for releasing this object using CGDataProviderRelease.

Discussion

You can use this function when you need to represent Core Graphics data as a CFData type. For example, you might create a CFData object when reading data from the pasteboard.

See Also

Creating Direct-Access Data Providers