Instance Method

initWithSize:

Creates an image renderer for drawing images of a given size.

Declaration

- (instancetype)initWithSize:(CGSize)size;

Parameters

size

The size of images output from the renderer, specified in points.

Return Value

An initialized image renderer.

Discussion

Use this initializer to create an image renderer that will draw images of a given size. This renderer uses the defaultFormat static method on UIGraphicsImageRendererContext to create its context, thereby selecting parameters that are the most appropriate for the current device.

See Also

Initializing an Image Renderer

- initWithBounds:format:

Creates a new image renderer with a given bounds and format.

- initWithSize:format:

Creates a new image renderer with a given size and format.