An NSImageView object displays image data from an NSImage object in a frame. An editable image view object behaves as an image well and supports copying, pasting, dragging, and using the Delete key to clear its content. Note that an image view performs its action only when it’s editable and a user drags an image to it. To allow users to perform a custom action when they click an image, use a button.


Specifying the Image

var image: NSImage?

The image displayed by the image view.

Specifying the Visual Characteristics

var imageFrameStyle: NSImageFrameStyle

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.