Opacity icon

Using Standard Images

Starting in Mac OS X 10.5, there is an API to use standard system images in applications. These images are much better than creating your own image because they are consistent throughout the system and are already provided with resolution independence.

You can find a list of the standard images in the documentation for NSImage (in the Application Kit Reference). To use one, create an image using [NSImage imageNamed:imageName], where imageName is the name for the standard image you want. The resulting NSImage can then be drawn or assigned to a button just like other images in Cocoa.

Important: Only use standard images to represent the ideas that are intended. Apple has warned that images may change later, so what looks like a globe or a gear now may look different layer, so using an image elsewhere just because it happens to look like what you want is a bad idea.

Related Topics

Designing Images for Applications