The IKImageView class provides an efficient way to display images in a view while at the same time supporting a number of image editing operations such as rotating, zooming, and cropping. It supports drag and drop for the NSFilenamesPboardType flavor so that the user can drag an image to the view. If possible, image rendering uses hardware acceleration to achieve optimal performance. The IKImageView class is implemented as a subclass of NSView. Similar to NSImageView, the IKImageView class is used to display a single image.


@interface IKImageView : NSView


You can provide an images for the view in any of these formats:

Providing a file reference is the preferred way to set the the image for a view because in addition to the actual image data, IKImageView also handles the image metadata embedded in the file. The image view automatically fetches the metadata from a file reference, whereas for the other sources (except for a CGImageSourceRef source), it cannot. For images set from other sources, you need to set the metadata separately.

IKImageView supports multi-frame images (TIFF, GIF, and so forth) and animated images.


Getting and Setting Image View Characteristics


Specifies the delegate object of the receiver.


Specifies the zoom factor for the image view.


Specifies the rotation angle for the image view.


Specifies the current tool mode for the image view.


Specifies the automatic resizing state for the image view.


Specifies the horizontal scroll bar state for the image view.


Specifies the vertical scroll bar state for the image view.


Specifies the automatic-hiding scroll bar state for the image view.


Specifies the drag-and-drop support state for the image view.


Specifies the editable state for the image view.


Specifies the image-opening state of the editing pane in the image view.


Specifies a Core Image filter for image correction.


Specifies the background color for the image view.

- imageSize

Returns the size of the image in the image view.

- imageProperties

Returns the metadata for the image in the view.

Getting and Setting Images

- image

Returns the image associated with the view, after any image corrections.

- setImage:imageProperties:

Sets the image to display in an image view.

- setImageWithURL:

Initializes an image view with the image specified by a URL.

Manipulating the Image in a View

- setRotationAngle:centerPoint:

Sets the rotation angle at the provided origin.

- setImageZoomFactor:centerPoint:

Sets the zoom factor at the provided origin.

- zoomImageToFit:

Zooms the image so that it fits in the image view.

- zoomImageToActualSize:

Zooms the image so that it is displayed using its true size.

- zoomImageToRect:

Zooms the image so that it fits in the specified rectangle.

- zoomIn:

Zooms the image in.

- zoomOut:

Zooms the image out.

- crop:

Crops the image using the current selection.

- flipImageHorizontal:

Flips an image along the horizontal axis.

- flipImageVertical:

Flips an image along the vertical axis.

- rotateImageLeft:

Rotates the image left (counter-clockwise).

- rotateImageRight:

Rotates the image right (clockwise).

Working With Core Animation

- setOverlay:forType:

Sets an overlay type for a Core Animation layer.

- overlayForType:

Returns the Core Animation layer associated with a layer type.


- scrollToPoint:

Scrolls the view to the specified point.

- scrollToRect:

Scrolls the view so that it includes the provided rectangular area.

Converting Points and Rectangles

- convertViewPointToImagePoint:

Converts an image view coordinate to an image coordinate.

- convertViewRectToImageRect:

Converts an image view rectangle to an image rectangle.

- convertImagePointToViewPoint:

Converts an image coordinate to an image view coordinate.

- convertImageRectToViewRect:

Converts an image rectangle to an image view rectangle.


Tool Modes

Image Kit tools modes referenced by the currentToolMode property.


Inherits From