pathForImageResource(_:)
Returns the location of the specified image resource file.
Declaration
func pathForImageResource(_ name: NSImage.Name) -> String?Parameters
- name:
The name of the image resource file, without any pathname information. Including a filename extension is optional.
Return Value
The absolute pathname of the resource file or nil if the file is not found.
Discussion
Image resources are those files in the bundle that are recognized by the NSImage class, including those that can be converted using the Image IO framework.