init(boundsSize:requestHandler:)
Creates a new image from existing artwork with the specified bounds.
Declaration
init(boundsSize: CGSize, requestHandler: @escaping (CGSize) -> UIImage)init(boundsSize: CGSize, requestHandler: @escaping (CGSize) -> NSImage)Parameters
- boundsSize:
The original size of the artwork.
- requestHandler:
A handler that the system calls for the requested artwork.
- size
The new size for the image.
Return Value
The newly resized artwork.
Discussion
The request handler returns the image in the newly requested size. The requested size must be less than the boundsSize parameter.