A display of image data from an NSImage object in a frame.


class NSImageView : NSControl


Image views can be static or editable. A static image view only displays the image that you specify. An editable image view object lets the user change the displayed image. You can also configure an image view to allow copying, pasting, deleting, and dragging of the image.


Configuring the Cell

class NSImageCell

An NSImageCell object displays a single image (encapsulated in an NSImage object) in a frame. This class provides methods for choosing the frame and for aligning and scaling the image to fit the frame.

Specifying the Image

var image: NSImage?

The image displayed by the image view.

Specifying the Visual Characteristics

var imageFrameStyle: NSImageView.FrameStyle

The style of frame that appears around the image.

var imageAlignment: NSImageAlignment

The alignment of the cell’s image inside the image view.

var imageScaling: NSImageScaling

The scaling mode applied to make the cell’s image fit the frame of the image view.

var animates: Bool

A Boolean value indicating whether the image view automatically plays animated images.

Responding to User Events

var isEditable: Bool

A Boolean value indicating whether the user can drag a new image into the image view.

var allowsCutCopyPaste: Bool

A Boolean value indicating whether the image view lets the user cut, copy, and paste the image contents.

See Also


class NSButton

A control that defines an area on the screen that can be used to trigger actions.

class NSColorWell

A control that displays a color value and lets the user change that color value.

Date Picker

Display a calendar date and provide controls for editing the date value.

class NSLevelIndicator

A visual representation of a level or quantity, using discrete values.

Path Control

A display of a file system path or virtual path information.

class NSPopUpButton

A control for selecting an item from a list.

class NSProgressIndicator

An interface that provides visual feedback to the user about the status of an ongoing task.

class NSRuleEditor

An interface for configuring a rule-based list of options.

class NSPredicateEditor

A defined set of rules that allows the editing of predicate objects.

Search Field

Provide a text field that is optimized for text-based search interfaces.

class NSSegmentedControl

Display one or more buttons in a single horizontal group.


Display a range of values from which the user selects a single value.

class NSStepper

An interface with up and down arrow buttons for incrementing or decrementing a value.

Text Field

Provide a simple interface for displaying and editing text, including support for password fields and secure forms of text entry.

Token Field

Provide a text field whose text can be rendered in a visually distinct way so that users can recognize portions more easily.


Provide a space for controls under a window's title bar and above your custom content.

Combo Box

Display a list of values in a pop-up menu that lets the user select a value or type in a custom value.

class NSMatrix

A legacy interface for grouping radio buttons or other types of cells together.

class NSSwitch

A control that offers a binary choice.