<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Quartz",
  "identifier" : "/documentation/Quartz/IKImageView",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Quartz"
    ],
    "preciseIdentifier" : "c:objc(cs)IKImageView"
  },
  "title" : "IKImageView"
}
-->

# IKImageView

A view that allows displaying and minor editing of an image.

```
class IKImageView
```

## Overview

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. If possible, image rendering uses hardware acceleration to achieve optimal performance. The `IKImageView` class is implemented as a subclass of <doc://com.apple.documentation/documentation/AppKit/NSView>. Similar to <doc://com.apple.documentation/documentation/AppKit/NSImageView>, the `IKImageView` class is used to display a single image.

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

- File reference (<doc://com.apple.documentation/documentation/Foundation/NSURL>, <doc://com.apple.documentation/documentation/CoreFoundation/CFURL>, or a path)
- <doc://com.apple.documentation/documentation/ImageIO/CGImageSource>
- Data (<doc://com.apple.documentation/documentation/Foundation/NSData> or <doc://com.apple.documentation/documentation/CoreFoundation/CFData>)
- Image (<doc://com.apple.documentation/documentation/CoreGraphics/CGImage> or <doc://com.apple.documentation/documentation/CoreImage/CIImage>)

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 <doc://com.apple.documentation/documentation/ImageIO/CGImageSource> 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.

## Topics

### Getting and Setting Image View Characteristics

[`delegate`](/documentation/Quartz/IKImageView/delegate)

Specifies the delegate object of the receiver.

[`zoomFactor`](/documentation/Quartz/IKImageView/zoomFactor)

Specifies the zoom factor for the image view.

[`rotationAngle`](/documentation/Quartz/IKImageView/rotationAngle)

Specifies the rotation angle for the image view.

[`currentToolMode`](/documentation/Quartz/IKImageView/currentToolMode)

Specifies the current tool mode for the image view.

[`autoresizes`](/documentation/Quartz/IKImageView/autoresizes)

Specifies the automatic resizing state for the image view.

[`hasHorizontalScroller`](/documentation/Quartz/IKImageView/hasHorizontalScroller)

Specifies the horizontal scroll bar state for the image view.

[`hasVerticalScroller`](/documentation/Quartz/IKImageView/hasVerticalScroller)

Specifies the vertical scroll bar state for the image view.

[`autohidesScrollers`](/documentation/Quartz/IKImageView/autohidesScrollers)

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

[`supportsDragAndDrop`](/documentation/Quartz/IKImageView/supportsDragAndDrop)

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

[`editable`](/documentation/Quartz/IKImageView/editable)

Specifies the editable state for the image view.

[`doubleClickOpensImageEditPanel`](/documentation/Quartz/IKImageView/doubleClickOpensImageEditPanel)

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

[`imageCorrection`](/documentation/Quartz/IKImageView/imageCorrection)

Specifies a Core Image filter for image correction.

[`backgroundColor`](/documentation/Quartz/IKImageView/backgroundColor)

Specifies the background color for the image view.

[`-  imageSize`](/documentation/Quartz/IKImageView/imageSize())

Returns the size of the image in the image view.

[`-  imageProperties`](/documentation/Quartz/IKImageView/imageProperties())

Returns the metadata for the image in the view.

### Getting and Setting Images

[`-  image`](/documentation/Quartz/IKImageView/image())

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

[`-  setImage:imageProperties:`](/documentation/Quartz/IKImageView/setImage(_:imageProperties:))

Sets the image to display in an image view.

[`-  setImageWithURL:`](/documentation/Quartz/IKImageView/setImageWith(_:))

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

### Manipulating the Image in a View

[`-  setRotationAngle:centerPoint:`](/documentation/Quartz/IKImageView/setRotationAngle(_:center:))

Sets the rotation angle at the provided origin.

[`-  setImageZoomFactor:centerPoint:`](/documentation/Quartz/IKImageView/setImageZoomFactor(_:center:))

Sets the zoom factor at the provided origin.

[`-  zoomImageToFit:`](/documentation/Quartz/IKImageView/zoomImageToFit(_:))

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

[`-  zoomImageToActualSize:`](/documentation/Quartz/IKImageView/zoomImageToActualSize(_:))

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

[`-  zoomImageToRect:`](/documentation/Quartz/IKImageView/zoomImage(to:))

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

[`-  zoomIn:`](/documentation/Quartz/IKImageView/zoomIn(_:))

Zooms the image in.

[`-  zoomOut:`](/documentation/Quartz/IKImageView/zoomOut(_:))

Zooms the image out.

[`-  crop:`](/documentation/Quartz/IKImageView/crop(_:))

Crops the image using the current selection.

[`-  flipImageHorizontal:`](/documentation/Quartz/IKImageView/flipImageHorizontal(_:))

Flips an image along the horizontal axis.

[`-  flipImageVertical:`](/documentation/Quartz/IKImageView/flipImageVertical(_:))

Flips an image along the vertical axis.

[`-  rotateImageLeft:`](/documentation/Quartz/IKImageView/rotateImageLeft(_:))

Rotates the image left (counter-clockwise).

[`-  rotateImageRight:`](/documentation/Quartz/IKImageView/rotateImageRight(_:))

Rotates the image right (clockwise).

### Working With Core Animation

[`-  setOverlay:forType:`](/documentation/Quartz/IKImageView/setOverlay(_:forType:))

Sets an overlay type for a Core Animation layer.

[`-  overlayForType:`](/documentation/Quartz/IKImageView/overlay(forType:))

Returns the Core Animation layer associated with a layer type.

### Scrolling

[`-  scrollToPoint:`](/documentation/Quartz/IKImageView/scroll(to:)-myqk)

Scrolls the view to the specified point.

[`-  scrollToRect:`](/documentation/Quartz/IKImageView/scroll(to:)-535q6)

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

### Converting Points and Rectangles

[`-  convertViewPointToImagePoint:`](/documentation/Quartz/IKImageView/convertPoint(toImagePoint:))

Converts an image view coordinate to an image coordinate.

[`-  convertViewRectToImageRect:`](/documentation/Quartz/IKImageView/convertRect(toImageRect:))

Converts an image view rectangle to an image rectangle.

[`-  convertImagePointToViewPoint:`](/documentation/Quartz/IKImageView/convertImagePoint(toViewPoint:))

Converts an image coordinate to an image view coordinate.

[`-  convertImageRectToViewRect:`](/documentation/Quartz/IKImageView/convertImageRect(toViewRect:))

Converts an image rectangle to an image view rectangle.

### Constants

[Tool Modes](/documentation/Quartz/tool-modes)

Image Kit tools modes referenced by the [`currentToolMode`](/documentation/Quartz/IKImageView/currentToolMode) property.

[Overlay Types](/documentation/Quartz/overlay-types)

A layer level.

## Relationships

### Conforms To

[`NSUserActivityRestoring`](/documentation/AppKit/NSUserActivityRestoring)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSDraggingDestination`](/documentation/AppKit/NSDraggingDestination)

[`Sendable`](/documentation/Swift/Sendable)

[`NSStandardKeyBindingResponding`](/documentation/AppKit/NSStandardKeyBindingResponding)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSUserInterfaceItemIdentification`](/documentation/AppKit/NSUserInterfaceItemIdentification)

[`NSAppearanceCustomization`](/documentation/AppKit/NSAppearanceCustomization)

[`Hashable`](/documentation/Swift/Hashable)

[`NSAccessibilityProtocol`](/documentation/AppKit/NSAccessibilityProtocol)

[`NSAccessibilityElementProtocol`](/documentation/AppKit/NSAccessibilityElementProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSAnimatablePropertyContainer`](/documentation/AppKit/NSAnimatablePropertyContainer)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`NSView`](/documentation/AppKit/NSView)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)