Contents

icon(for:)

Returns the action icon 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 action icon.

Return Value

The action icon, or nil if the icon was unable to be loaded.

Discussion

This icon should represent the extension in action sheets or toolbars. The returned image will be the best match for the specified size that is available in the extension’s action icon set. If no matching icon is available, the method will fall back to the extension’s icon.