Contents

init(templateImageName:)

Creates an action icon based on an image in your app’s bundle, preferably in an asset catalog.

Declaration

convenience init(templateImageName: String)

Parameters

  • templateImageName:

    The name of a custom image in the app’s asset catalog. If the image isn’t in your app’s asset catalog, this method searches the app bundle for the image.

    You don’t need to specify the filename extension or the @2x or @3x modifiers for this name. This method retrieves the appropriate image based on the system and the available image resources.

Return Value

An action icon initialized with the specified template image provided by your app.

See Also

Essentials