actionIcon(for:)
Returns the default action icon for the specified size.
Declaration
func actionIcon(for size: CGSize) -> UIImage?func actionIcon(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 serves as a default and should be used to represent the extension in contexts like action sheets or toolbars prior to the extension being loaded into an extension context. Once the extension is loaded, use the action(for:) API to get the tab-specific icon.
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.