IKImage 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
NSFilenames flavor so that the user can drag an image to the view. If possible, image rendering uses hardware acceleration to achieve optimal performance. The
IKImage class is implemented as a subclass of
NSView. Similar to
IKImage class is used to display a single image.
- macOS 10.5+
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,
IKImage 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
CGImage source), it cannot. For images set from other sources, you need to set the metadata separately.
IKImage supports multi-frame images (TIFF, GIF, and so forth) and animated images.