Einhugur macOS Bridge plugin.

NSImage.FromNamedImage Method

Returns the image object associated with the specified name.

shared FromNamedImage(
   imageName as String) as EinhugurMacOSBridge.NSImage

Parameters

imageName
The name associated with the desired image. This can be a name you assigned to the image or the name of an image file in your app bundle.

Constants from EinhugurMacOSBridge.NamedImages can be used here to get system images.

Returns

EinhugurMacOSBridge.NSImage
The NSImage object associated with the specified name or nil if no such image was found.

Remarks

This method searches for named images in several places, returning the first image it finds matching the given name. The order of the search is as follows:
Search for an object whose name was set explicitly using the setName: method and currently resides in the image cache.
Search the app's main bundle for a file whose name matches the specified string.
Search the Application Kit framework for a shared image with the specified name.

See Also

NSImage Class