Initializer

init(data:)

Creates a drawing object and populates it with previously drawn content.

Declaration

init(data: Data) throws

Parameters

data

The initial data to add to the canvas. Only specify data you previously obtained from a canvas view.

error

On input, a variable to use for storing an error. If an error occurs, this parameter is set to an NSError object that contains information about the error that occurred. Specify nil to ignore errors.

Return Value

A new canvas object initialized with the specified data.

See Also

Creating a Drawing Object

init()

Creates a drawing object with no initial content.