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

# IKImageBrowserView

A view for displaying and browsing a large collection of images and movies.

```
class IKImageBrowserView
```

## Overview

The [`IKImageBrowserView`](/documentation/Quartz/IKImageBrowserView) class is a view for displaying and browsing a large amount of images and movies efficiently. This class will be deprecated in a future release. Please switch to <doc://com.apple.documentation/documentation/AppKit/NSCollectionView> instead.

You must set a datasource for the view and implement, at a minimum, the <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/numberOfItems(inImageBrowser:)> and <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/imageBrowser(_:itemAt:)> described in [IKImageBrowserDataSource Protocol](/documentation/Quartz/ikimagebrowserdatasource-protocol). The items must conform to the IKImageBrowserItem Protocol protocol.

The class’s delegate object must conform to IKImageBrowserDelegate Protocol protocol. It receives notification of changes in selection, as well as mouse events in the cells.

> Core Animation Integration:
> The image browser supports either being hosted in a layer-backed view or using custom layers for its own appearance. Custom layers on the image browser are not supported when the image browser is itself backed by a layer.

## Topics

### Initializing and Setting Up an Image Browser View

[`initWithFrame:`](/documentation/Quartz/IKImageBrowserView/initWithFrame:)

Initializes a newly allocated image browser view with the provided frame rectangle.

### Updating the Display of the Content

[`reloadData()`](/documentation/Quartz/IKImageBrowserView/reloadData())

Marks the receiver as needing its data reloaded.

### Getting and Setting the Delegate

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

Returns the delegate of the receiver.

### Getting and Setting the Data Source

[`dataSource`](/documentation/Quartz/IKImageBrowserView/dataSource)

Returns the data source of the receiver.

### Setting the Appearance

[`setCellsStyleMask(_:)`](/documentation/Quartz/IKImageBrowserView/setCellsStyleMask(_:))

Defines the appearance style of the cells.

[`cellsStyleMask()`](/documentation/Quartz/IKImageBrowserView/cellsStyleMask())

Returns the appearance style mask for the cell.

[`setConstrainsToOriginalSize(_:)`](/documentation/Quartz/IKImageBrowserView/setConstrainsToOriginalSize(_:))

Sets whether the receiver constrains the cell’s image to its original size.

[`constrainsToOriginalSize()`](/documentation/Quartz/IKImageBrowserView/constrainsToOriginalSize())

Returns whether the receiver constrains the cell’s image to its original size.

[`setIntercellSpacing(_:)`](/documentation/Quartz/IKImageBrowserView/setIntercellSpacing(_:))

Sets the spacing between cells in the view.

[`intercellSpacing()`](/documentation/Quartz/IKImageBrowserView/intercellSpacing())

Returns the spacing between cells in the view.

### Creating a Custom Cell for an Item

[`newCell(forRepresentedItem:)`](/documentation/Quartz/IKImageBrowserView/newCell(forRepresentedItem:))

Returns the cell to use for the specified item.

### Zooming and Resizing

[`setZoomValue(_:)`](/documentation/Quartz/IKImageBrowserView/setZoomValue(_:))

Sets the zoom value.

[`zoomValue()`](/documentation/Quartz/IKImageBrowserView/zoomValue())

Returns the current zoom value.

[`setContentResizingMask(_:)`](/documentation/Quartz/IKImageBrowserView/setContentResizingMask(_:))

Determines how the receiver resizes its content when zooming.

[`contentResizingMask()`](/documentation/Quartz/IKImageBrowserView/contentResizingMask())

Returns the receiver’s content resizing mask, which determines how its content is resized while zooming.

### Scrolling

[`scrollIndexToVisible(_:)`](/documentation/Quartz/IKImageBrowserView/scrollIndexToVisible(_:))

Scrolls the receiver to the item at the specified index.

### Setting and Getting Cell Size

[`setCellSize(_:)`](/documentation/Quartz/IKImageBrowserView/setCellSize(_:))

Sets the cell  size.

[`cellSize()`](/documentation/Quartz/IKImageBrowserView/cellSize())

Returns the cell size.

### Getting Item Information

[`indexOfItem(at:)`](/documentation/Quartz/IKImageBrowserView/indexOfItem(at:))

Returns the index of the item at the specified location.

[`itemFrame(at:)`](/documentation/Quartz/IKImageBrowserView/itemFrame(at:))

Returns the frame rectangle for the item located at the specified index.

[`visibleItemIndexes()`](/documentation/Quartz/IKImageBrowserView/visibleItemIndexes())

Returns the indexes of the view’s currently visible items.

[`cellForItem(at:)`](/documentation/Quartz/IKImageBrowserView/cellForItem(at:))

Returns the browser cell for the item at the specified index.

### Reordering and Groups Items

[`selectionIndexes()`](/documentation/Quartz/IKImageBrowserView/selectionIndexes())

Returns the indexes of the selected cells.

[`setSelectionIndexes(_:byExtendingSelection:)`](/documentation/Quartz/IKImageBrowserView/setSelectionIndexes(_:byExtendingSelection:))

Selects cells at the specified indexes.

[`setAllowsMultipleSelection(_:)`](/documentation/Quartz/IKImageBrowserView/setAllowsMultipleSelection(_:))

Controls whether the user can select more than one cell at a time.

[`allowsMultipleSelection()`](/documentation/Quartz/IKImageBrowserView/allowsMultipleSelection())

Returns whether multiple selections are allowed.

[`setAllowsEmptySelection(_:)`](/documentation/Quartz/IKImageBrowserView/setAllowsEmptySelection(_:))

Controls whether an empty selection is allowed.

[`allowsEmptySelection()`](/documentation/Quartz/IKImageBrowserView/allowsEmptySelection())

Returns whether an empty selection is allowed.

[`setAllowsReordering(_:)`](/documentation/Quartz/IKImageBrowserView/setAllowsReordering(_:))

Controls whether the user can reorder items.

[`allowsReordering()`](/documentation/Quartz/IKImageBrowserView/allowsReordering())

Returns whether the user can reorder items.

[`setAnimates(_:)`](/documentation/Quartz/IKImageBrowserView/setAnimates(_:))

Controls whether the receiver animates reordering and changes of the data source.

[`animates()`](/documentation/Quartz/IKImageBrowserView/animates())

Returns whether the receiver animates reordering and changes of the data source.

[`expandGroup(at:)`](/documentation/Quartz/IKImageBrowserView/expandGroup(at:))

Expands a group at the specified index.

[`collapseGroup(at:)`](/documentation/Quartz/IKImageBrowserView/collapseGroup(at:))

Collapses a group at the specified index.

[`isGroupExpanded(at:)`](/documentation/Quartz/IKImageBrowserView/isGroupExpanded(at:))

Returns whether the group at the provided index is expanded.

### Supporting Drag and Drop

[`setDraggingDestinationDelegate(_:)`](/documentation/Quartz/IKImageBrowserView/setDraggingDestinationDelegate(_:))

Sets the dragging destination delegate of the receiver.

[`draggingDestinationDelegate()`](/documentation/Quartz/IKImageBrowserView/draggingDestinationDelegate())

Returns the dragging destination delegate of the receiver.

[`setDrop(_:dropOperation:)`](/documentation/Quartz/IKImageBrowserView/setDrop(_:dropOperation:))

Allows the class to retarget the drop action.

[`indexAtLocationOfDroppedItem()`](/documentation/Quartz/IKImageBrowserView/indexAtLocationOfDroppedItem())

Returns the index of the cell where the drop operation occurred.

[`setAllowsDroppingOnItems(_:)`](/documentation/Quartz/IKImageBrowserView/setAllowsDroppingOnItems(_:))

Specifies whether the user can drop on items.

[`allowsDroppingOnItems()`](/documentation/Quartz/IKImageBrowserView/allowsDroppingOnItems())

Returns whether the user can drop on items.

[`dropOperation()`](/documentation/Quartz/IKImageBrowserView/dropOperation())

Returns the current drop operation.

### Core Animation Layer Integration

[`setForegroundLayer(_:)`](/documentation/Quartz/IKImageBrowserView/setForegroundLayer(_:))

The Core Animation layer used as the foreground overlay.

[`foregroundLayer()`](/documentation/Quartz/IKImageBrowserView/foregroundLayer())

Returns the foreground Core Animation layer

[`setBackgroundLayer(_:)`](/documentation/Quartz/IKImageBrowserView/setBackgroundLayer(_:))

The Core Animation layer used as the view’s background.

[`backgroundLayer()`](/documentation/Quartz/IKImageBrowserView/backgroundLayer())

Returns the foreground Core Animation layer

### QuickLook Support

[`setCanControlQuickLookPanel(_:)`](/documentation/Quartz/IKImageBrowserView/setCanControlQuickLookPanel(_:))

Specifies whether the view can automatically take control of the QuickLook panel.

[`canControlQuickLookPanel()`](/documentation/Quartz/IKImageBrowserView/canControlQuickLookPanel())

Returns whether the view can automatically take control of the QuickLook panel.

### Getting Columns and Rows Information

[`numberOfColumns()`](/documentation/Quartz/IKImageBrowserView/numberOfColumns())

Returns the current number of columns.

[`numberOfRows()`](/documentation/Quartz/IKImageBrowserView/numberOfRows())

Returns the current number of rows.

[`rect(ofColumn:)`](/documentation/Quartz/IKImageBrowserView/rect(ofColumn:))

Returns the rectangle containing the specified column.

[`columnIndexes(in:)`](/documentation/Quartz/IKImageBrowserView/columnIndexes(in:))

Returns the column indexes in the specified rectangle.

[`rect(ofRow:)`](/documentation/Quartz/IKImageBrowserView/rect(ofRow:))

Returns the rectangle containing the specified row.

[`rowIndexes(in:)`](/documentation/Quartz/IKImageBrowserView/rowIndexes(in:))

Returns the row indexes in the specified rectangle.

### Constants

[Cell Appearance Style Masks](/documentation/Quartz/1564248-cell-appearance-style-masks)

Masks for the appearance style bit field.

[Group Style Attributes](/documentation/Quartz/1564247-group-style-attributes)

Attributes for the group style. Used by the

[View Options Keys](/documentation/Quartz/view-options-keys)

Keys for image browser view options. You set and retrieve values for these keys by sending the view `setValue:forKey` and `valueForKey:` messages.

[Group Keys](/documentation/Quartz/group-keys)

Keys for group attributes.

[`IKImageBrowserDropOperation`](/documentation/Quartz/IKImageBrowserDropOperation)

These constants specify the locations for dropping items onto the browser view. Used by the method [`setDrop(_:dropOperation:)`](/documentation/Quartz/IKImageBrowserView/setDrop(_:dropOperation:)).



---

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)