Image Views

An image view displays a single image or an animated sequence of images over a transparent or opaque background. Within an image view, images may be stretched, scaled, sized to fit, or pinned to a specific location. Image views are noneditable and noninteractive by default.

Screenshot of the Wallet & Apple Pay preferences pane, showing an image within the pane.

Enable editing if applicable to your app. An image well is an editable image view that supports copying, pasting, dragging, and using the Delete key to clear its content. See Image Wells.

Use a button instead of an image view to make a clickable image. An image button contains an image or icon, appears in a view, and initiates an instantaneous app-specific action. See Image Buttons.

Use a template image to adopt the tint of an enclosing view. Template images discard color information and use a mask to produce the appearance you see onscreen. Template images are typically used for displaying icons in toolbar buttons. See isTemplate of NSImage.

Ensure that all images in an animated sequence are consistently sized. Ideally, images should be prescaled to fit the view so the system doesn't have to do any scaling. If the system must perform scaling, it's easiest to achieve the desired results when all images are the same size and shape.

For developer guidance, see NSImageView.