Contents

icon(for:)

Returns the extension’s icon image for the specified size.

Declaration

func icon(for size: CGSize) -> UIImage?
func icon(for size: CGSize) -> NSImage?

Parameters

  • size:

    The size to use when looking up the icon.

Return Value

The extension’s icon image, or nil if the icon was unable to be loaded.

Discussion

This icon should represent the extension in settings or other areas that show the extension. The returned image will be the best match for the specified size that is available in the extension’s icon set. If no matching icon can be found, the method will return nil.

See Also

Related Documentation