Contents

init(named:)

Creates an image object from an image file in the extension’s bundle.

Declaration

convenience init(named name: String)

Parameters

  • name:

    The filename of the image that the system loads from the extension’s bundle. You can omit the file’s extension for PNG images. For all other image file formats, you must include the extension.

Return Value

An image object that contains the bundled image file, or nil if the system can’t find an image with the specified filename.

See Also

Creating an Image Object