Class

IKImageBrowserView

The 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 NSCollectionView instead.

Overview

You must set a datasource for the view and implement, at a minimum, the numberOfItems(inImageBrowser:) and imageBrowser(_:itemAt:) described in 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.

Symbols

Updating the Display of the Content

func reloadData()

Marks the receiver as needing its data reloaded.

Getting and Setting the Delegate

var delegate: AnyObject!

Returns the delegate of the receiver.

Getting and Setting the Data Source

var dataSource: AnyObject!

Returns the data source of the receiver.

Setting the Appearance

func setCellsStyleMask(Int)

Defines the appearance style of the cells.

func cellsStyleMask()

Returns the appearance style mask for the cell.

func setConstrainsToOriginalSize(Bool)

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

func constrainsToOriginalSize()

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

func setIntercellSpacing(NSSize)

Sets the spacing between cells in the view.

func intercellSpacing()

Returns the spacing between cells in the view.

Creating a Custom Cell for an Item

func newCell(forRepresentedItem: Any!)

Returns the cell to use for the specified item.

Zooming and Resizing

func setZoomValue(Float)

Sets the zoom value.

func zoomValue()

Returns the current zoom value.

func setContentResizingMask(Int)

Determines how the receiver resizes its content when zooming.

func contentResizingMask()

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

Scrolling

func scrollIndexToVisible(Int)

Scrolls the receiver to the item at the specified index.

Setting and Getting Cell Size

func setCellSize(NSSize)

Sets the cell size.

func cellSize()

Returns the cell size.

Getting Item Information

func indexOfItem(at: NSPoint)

Returns the index of the item at the specified location.

func itemFrame(at: Int)

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

func visibleItemIndexes()

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

func cellForItem(at: Int)

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

Reordering and Groups Items

func selectionIndexes()

Returns the indexes of the selected cells.

func setAllowsMultipleSelection(Bool)

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

func allowsMultipleSelection()

Returns whether multiple selections are allowed.

func setAllowsEmptySelection(Bool)

Controls whether an empty selection is allowed.

func allowsEmptySelection()

Returns whether an empty selection is allowed.

func setAllowsReordering(Bool)

Controls whether the user can reorder items.

func allowsReordering()

Returns whether the user can reorder items.

func setAnimates(Bool)

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

func animates()

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

func expandGroup(at: Int)

Expands a group at the specified index.

func collapseGroup(at: Int)

Collapses a group at the specified index.

func isGroupExpanded(at: Int)

Returns whether the group at the provided index is expanded.

Supporting Drag and Drop

func setDraggingDestinationDelegate(Any!)

Sets the dragging destination delegate of the receiver.

func draggingDestinationDelegate()

Returns the dragging destination delegate of the receiver.

func setDrop(Int, dropOperation: IKImageBrowserDropOperation)

Allows the class to retarget the drop action.

func indexAtLocationOfDroppedItem()

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

func setAllowsDroppingOnItems(Bool)

Specifies whether the user can drop on items.

func allowsDroppingOnItems()

Returns whether the user can drop on items.

func dropOperation()

Returns the current drop operation.

Core Animation Layer Integration

func setForegroundLayer(CALayer!)

The Core Animation layer used as the foreground overlay.

func foregroundLayer()

Returns the foreground Core Animation layer

func setBackgroundLayer(CALayer!)

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

func backgroundLayer()

Returns the foreground Core Animation layer

QuickLook Support

func setCanControlQuickLookPanel(Bool)

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

func canControlQuickLookPanel()

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

Getting Columns and Rows Information

func numberOfColumns()

Returns the current number of columns.

func numberOfRows()

Returns the current number of rows.

func rect(ofColumn: Int)

Returns the rectangle containing the specified column.

func columnIndexes(in: NSRect)

Returns the column indexes in the specified rectangle.

func rect(ofRow: Int)

Returns the rectangle containing the specified row.

func rowIndexes(in: NSRect)

Returns the row indexes in the specified rectangle.

Constants

Cell Appearance Style Masks

Masks for the appearance style bit field.

Group Style Attributes

Attributes for the group style. Used by the

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

Keys for group attributes.

IKImageBrowserDropOperation

These constants specify the locations for dropping items onto the browser view. Used by the method setDrop(_:dropOperation:).

Relationships

Inherits From