Mac Developer Library

Developer

Quartz Framework Reference IKImageBrowserView Class Reference

Options
Deployment Target:

On This Page
Language:

IKImageBrowserView

The IKImageBrowserView class is a view for displaying and browsing a large amount of images and movies efficiently.

You must set a datasource for the view and implement, at a minimum, the numberOfItemsInImageBrowser: and imageBrowser:itemAtIndex: described in IKImageBrowserDataSource Protocol Reference. 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.

Inheritance


Import Statement


Swift

import Quartz

Objective-C

@import Quartz;

Availability


Available in OS X v10.5 and later.
  • Initializes a newly allocated image browser view with the provided frame rectangle.

    Declaration

    Swift

    init!(frame frame: NSRect)

    Objective-C

    - (id)initWithFrame:(NSRect)frame

    Parameters

    frame

    The rectangle for the image browser.

    Return Value

    The initialized object.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Marks the receiver as needing its data reloaded.

    Declaration

    Swift

    func reloadData()

    Objective-C

    - (void)reloadData

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Sets the delegate of the receiver.

    Declaration

    Swift

    func setDelegate(_ aDelegate: AnyObject!)

    Objective-C

    - (void)setDelegate:(id)aDelegate

    Parameters

    aDelegate

    The delegate must implement the IKImageBrowserDelegate informal protocol.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

    See Also

    – delegate

  • Returns the delegate of the receiver.

    Declaration

    Swift

    func delegate() -> AnyObject!

    Objective-C

    - (id)delegate

    Return Value

    The delegate.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Sets the data source of the receiver.

    Declaration

    Swift

    func setDataSource(_ source: AnyObject!)

    Objective-C

    - (void)setDataSource:(id)source

    Parameters

    source

    A data source (IKImageBrowserDataSource).

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

    See Also

    – dataSource

  • Returns the data source of the receiver.

    Declaration

    Swift

    func dataSource() -> AnyObject!

    Objective-C

    - (id)dataSource

    Return Value

    The data source (IKImageBrowserDataSource). The data source is not retained by the receiver.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Defines the appearance style of the cells.

    Declaration

    Swift

    func setCellsStyleMask(_ mask: Int)

    Objective-C

    - (void)setCellsStyleMask:(NSUInteger)mask

    Parameters

    mask

    An integer bit mask. A mask can be specified by combining any of the options described in “Cell Appearance Style Masks” using the C bitwise OR operator.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns the appearance style mask for the cell.

    Declaration

    Swift

    func cellsStyleMask() -> Int

    Objective-C

    - (NSUInteger)cellsStyleMask

    Return Value

    The appearance style mask for the cell.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

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

    Declaration

    Swift

    func setConstrainsToOriginalSize(_ flag: Bool)

    Objective-C

    - (void)setConstrainsToOriginalSize:(BOOL)flag

    Parameters

    flag

    A flag that specifies whether to constrain the image. The default value is NOfalse.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

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

    Declaration

    Swift

    func constrainsToOriginalSize() -> Bool

    Objective-C

    - (BOOL)constrainsToOriginalSize

    Return Value

    NOfalse if the image is not constrained; otherwise YEStrue.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Sets the spacing between cells in the view.

    Declaration

    Swift

    func setIntercellSpacing(_ aSize: NSSize)

    Objective-C

    - (void)setIntercellSpacing:(NSSize)aSize

    Parameters

    aSize

    The vertical and horizontal spacing between cells.

    Discussion

    By default, both values are 10.0 in the receiver’s coordinate system.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the spacing between cells in the view.

    Declaration

    Swift

    func intercellSpacing() -> NSSize

    Objective-C

    - (NSSize)intercellSpacing

    Return Value

    The vertical and horizontal spacing between cells.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the cell to use for the specified item.

    Declaration

    Swift

    func newCellForRepresentedItem(_ anItem: AnyObject!) -> IKImageBrowserCell!

    Objective-C

    - (IKImageBrowserCell *)newCellForRepresentedItem:(id)anItem

    Parameters

    anItem

    The item that the returned cell will represent.

    Return Value

    A new cell.

    Discussion

    Subclasses can override this method to customize the appearance of the cell that will represent anItem.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Sets the zoom value.

    Declaration

    Swift

    func setZoomValue(_ aValue: Float)

    Objective-C

    - (void)setZoomValue:(float)aValue

    Parameters

    aValue

    The zoom value. This value should be greater or equal to zero and less or equal than one. A zoom value of zero corresponds to the minimum size (40x40 pixels). A zoom value of one means images fits the browser bounds. Other values are interpolated.

    Discussion

    You must use setZoomValue or setCellSize:, but not both. Setting the zoom value changes the cell size, and vice versa.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns the current zoom value.

    Declaration

    Swift

    func zoomValue() -> Float

    Objective-C

    - (float)zoomValue

    Return Value

    The zoom value.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Determines how the receiver resizes its content when zooming.

    Declaration

    Swift

    func setContentResizingMask(_ mask: Int)

    Objective-C

    - (void)setContentResizingMask:(NSUInteger)mask

    Parameters

    mask

    A resizing mask. You specify a mask by combining any of the following options using the C bitwise OR operator: NSViewWidthSizable, NSViewHeightSizable. Other values are ignored.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

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

    Declaration

    Swift

    func contentResizingMask() -> Int

    Objective-C

    - (NSUInteger)contentResizingMask

    Return Value

    The content resizing mask.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Scrolls the receiver to the item at the specified index.

    Declaration

    Swift

    func scrollIndexToVisible(_ index: Int)

    Objective-C

    - (void)scrollIndexToVisible:(NSInteger)index

    Parameters

    index

    The index of the item to scroll to.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Sets the cell size.

    Declaration

    Swift

    func setCellSize(_ size: NSSize)

    Objective-C

    - (void)setCellSize:(NSSize)size

    Parameters

    size

    The size to set.

    Discussion

    You must use setCellSize or setZoomValue:, but not both. Setting the zoom value changes the cell size, and vice versa.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns the cell size.

    Declaration

    Swift

    func cellSize() -> NSSize

    Objective-C

    - (NSSize)cellSize

    Return Value

    The current size for the cells in the image browser view.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns the index of the item at the specified location.

    Declaration

    Swift

    func indexOfItemAtPoint(_ point: NSPoint) -> Int

    Objective-C

    - (NSInteger)indexOfItemAtPoint:(NSPoint)point

    Parameters

    point

    The location of the item.

    Return Value

    The index of the item or NSNotFound if no item at this location.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

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

    Declaration

    Swift

    func itemFrameAtIndex(_ index: Int) -> NSRect

    Objective-C

    - (NSRect)itemFrameAtIndex:(NSInteger)index

    Parameters

    index

    The index of the item whose frame rectangle you want to obtain.

    Return Value

    The frame rectangle of the item.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

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

    Declaration

    Swift

    func visibleItemIndexes() -> NSIndexSet!

    Objective-C

    - (NSIndexSet *)visibleItemIndexes

    Return Value

    A set containing the indexes.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

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

    Declaration

    Swift

    func cellForItemAtIndex(_ index: Int) -> IKImageBrowserCell!

    Objective-C

    - (IKImageBrowserCell *)cellForItemAtIndex:(NSUInteger)index

    Parameters

    index

    The index.

    Return Value

    The browser cell at the specified index.

    Discussion

    Subclasses must not override this method.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the indexes of the selected cells.

    Declaration

    Swift

    func selectionIndexes() -> NSIndexSet!

    Objective-C

    - (NSIndexSet *)selectionIndexes

    Return Value

    The indexes of the selected cells.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Selects cells at the specified indexes.

    Declaration

    Swift

    func setSelectionIndexes(_ indexes: NSIndexSet!, byExtendingSelection extendSelection: Bool)

    Objective-C

    - (void)setSelectionIndexes:(NSIndexSet *)indexes byExtendingSelection:(BOOL)extendSelection

    Parameters

    indexes

    The indexes of the cells you want to select.

    extendSelection

    A BOOL value that specifies whether to extend the current selection. Pass YEStrue to extends the selection; NOfalse replaces the current selection.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

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

    Declaration

    Swift

    func setAllowsMultipleSelection(_ flag: Bool)

    Objective-C

    - (void)setAllowsMultipleSelection:(BOOL)flag

    Parameters

    flag

    A BOOL value that specifies whether to allow multiple selections.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns whether multiple selections are allowed.

    Declaration

    Swift

    func allowsMultipleSelection() -> Bool

    Objective-C

    - (BOOL)allowsMultipleSelection

    Return Value

    YEStrue if the receiver allows the user to select more than one cell at a time; NOfalse otherwise.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Controls whether an empty selection is allowed.

    Declaration

    Swift

    func setAllowsEmptySelection(_ flag: Bool)

    Objective-C

    - (void)setAllowsEmptySelection:(BOOL)flag

    Parameters

    flag

    A BOOL value that specifies whether to allow an empty selection.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns whether an empty selection is allowed.

    Declaration

    Swift

    func allowsEmptySelection() -> Bool

    Objective-C

    - (BOOL)allowsEmptySelection

    Return Value

    YEStrue if the receiver allows an empty selection; NOfalse otherwise.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Controls whether the user can reorder items.

    Declaration

    Swift

    func setAllowsReordering(_ flag: Bool)

    Objective-C

    - (void)setAllowsReordering:(BOOL)flag

    Parameters

    flag

    A BOOL value that specifies whether the user can reorder items.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns whether the user can reorder items.

    Declaration

    Swift

    func allowsReordering() -> Bool

    Objective-C

    - (BOOL)allowsReordering

    Return Value

    YEStrue if the user can reorder items; NOfalse otherwise.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

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

    Declaration

    Swift

    func setAnimates(_ flag: Bool)

    Objective-C

    - (void)setAnimates:(BOOL)flag

    Parameters

    flag

    A BOOL value that specifies whether the receiver animates reordering and changes of the data source.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

    See Also

    – animates

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

    Declaration

    Swift

    func animates() -> Bool

    Objective-C

    - (BOOL)animates

    Return Value

    YEStrue if the receiver animates reordering and changes of the data source; NOfalse otherwise.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Expands a group at the specified index.

    Declaration

    Swift

    func expandGroupAtIndex(_ index: Int)

    Objective-C

    - (void)expandGroupAtIndex:(NSUInteger)index

    Parameters

    index

    The index of the group you want to expand.

    Special Considerations

    This method is declared in OS X v10.5, but an implementation was not provided until OS X v10.6. Avoid using this method on OS X v10.5.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Collapses a group at the specified index.

    Declaration

    Swift

    func collapseGroupAtIndex(_ index: Int)

    Objective-C

    - (void)collapseGroupAtIndex:(NSUInteger)index

    Parameters

    index

    The index of the group you want to collapse.

    Special Considerations

    This method is declared in OS X v10.5, but an implementation was not provided until OS X v10.6. Avoid using this method on OS X v10.5.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns whether the group at the provided index is expanded.

    Declaration

    Swift

    func isGroupExpandedAtIndex(_ index: Int) -> Bool

    Objective-C

    - (BOOL)isGroupExpandedAtIndex:(NSUInteger)index

    Parameters

    index

    The index you want to check.

    Return Value

    YEStrue if the group is expanded; NOfalse otherwise.

    Special Considerations

    This method is declared in OS X v10.5, but an implementation was not provided until OS X v10.6. Avoid using this method on OS X v10.5.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Sets the dragging destination delegate of the receiver.

    Declaration

    Swift

    func setDraggingDestinationDelegate(_ delegate: AnyObject!)

    Objective-C

    - (void)setDraggingDestinationDelegate:(id)delegate

    Parameters

    delegate

    The delegate (NSDraggingDestination) to set.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Returns the dragging destination delegate of the receiver.

    Declaration

    Swift

    func draggingDestinationDelegate() -> AnyObject!

    Objective-C

    - (id)draggingDestinationDelegate

    Return Value

    The receiver's dragging destination delegate.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Allows the class to retarget the drop action.

    Declaration

    Swift

    func setDropIndex(_ index: Int, dropOperation operation: IKImageBrowserDropOperation)

    Objective-C

    - (void)setDropIndex:(NSInteger)index dropOperation:(IKImageBrowserDropOperation)operation

    Parameters

    index

    The requested drop index.

    operation

    The requested drop operation. The possible values are described in IKImageBrowserDropOperation.

    Discussion

    For example, To specify a drop on the second item, one would specify index as 1, and operation as IKImageBrowserDropOn. To specify a drop after the last item, one would specify index as the number of items and operation as IKImageBrowserDropBefore.

    Passing a value of –1 for index, and IKImageBrowserDropOn as the operation causes the entire browser view to be highlighted rather than a specific item. This is useful if the data displayed by the receiver does not allow the user to drop items at a specific item location

    .

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

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

    Declaration

    Swift

    func indexAtLocationOfDroppedItem() -> Int

    Objective-C

    - (NSUInteger)indexAtLocationOfDroppedItem

    Return Value

    The index of the cell where the drop operation occurred.

    Discussion

    The returned index is valid until the next drop occurs.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Specifies whether the user can drop on items.

    Declaration

    Swift

    func setAllowsDroppingOnItems(_ flag: Bool)

    Objective-C

    - (void)setAllowsDroppingOnItems:(BOOL)flag

    Parameters

    flag

    YEStrue if the user is able to drop on items, otherwise NOfalse.

    Discussion

    The default is NOfalse.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns whether the user can drop on items.

    Declaration

    Swift

    func allowsDroppingOnItems() -> Bool

    Objective-C

    - (BOOL)allowsDroppingOnItems

    Return Value

    YEStrue if the user is able to drop on items, otherwise NOfalse.

    Discussion

    The default is NOfalse.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the current drop operation.

    Declaration

    Swift

    func dropOperation() -> IKImageBrowserDropOperation

    Objective-C

    - (IKImageBrowserDropOperation)dropOperation

    Return Value

    IKImageBrowserDropOn if the drop occurs on an item, otherwise IKImageBrowserDropBefore.

    Discussion

    The returned value is valid when a drop occurred and until next drop.

    For example, given a browser with N cells , a cell of N-1 and operation of IKImageBrowserDropOn would specify a drop on the last cell. To specify a drop after the last cell, one would use an index of N and IKImageBrowserDropBefore for the operation.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • The Core Animation layer used as the foreground overlay.

    Declaration

    Swift

    func setForegroundLayer(_ aLayer: CALayer!)

    Objective-C

    - (void)setForegroundLayer:(CALayer *)aLayer

    Parameters

    aLayer

    A CALayer instance.

    Discussion

    The foreground overlay layer can have sublayers. Additionally, the layers can also contain animations.

    The foreground layer is an overlay that is applied to the view. It can be used to provide information such as loading progress or for pure cosmetic purposes, such as dark gradients on top and bottom of the browser view.

    This layer is optional.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the foreground Core Animation layer

    Declaration

    Swift

    func foregroundLayer() -> CALayer!

    Objective-C

    - (CALayer *)foregroundLayer

    Return Value

    A CALayer instance.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

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

    Declaration

    Swift

    func setBackgroundLayer(_ aLayer: CALayer!)

    Objective-C

    - (void)setBackgroundLayer:(CALayer *)aLayer

    Parameters

    aLayer

    A CALayer instance.

    Discussion

    The background layer can have sublayers. Additionally, the layers can also contain animations.

    The layer is optional.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the foreground Core Animation layer

    Declaration

    Swift

    func backgroundLayer() -> CALayer!

    Objective-C

    - (CALayer *)backgroundLayer

    Return Value

    A CALayer instance.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

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

    Declaration

    Swift

    func setCanControlQuickLookPanel(_ flag: Bool)

    Objective-C

    - (void)setCanControlQuickLookPanel:(BOOL)flag

    Parameters

    flag

    YEStrue, if the view can display the QuickLook panel, otherwise NOfalse.

    Discussion

    When the browser view displays the QuickLook panel it sets itself as the QuickLook datasource. If the browser cells returned by the datasource return items that are URLs or paths, then the QuickLook panel will display the image at that location. Otherwise, the browser cell must implement the QLPreviewItem protocol and return the requested URL for the custom cell.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

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

    Declaration

    Swift

    func canControlQuickLookPanel() -> Bool

    Objective-C

    - (BOOL)canControlQuickLookPanel

    Return Value

    YEStrue, if the view can display the Quick Look panel, otherwise NOfalse.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the current number of columns.

    Declaration

    Swift

    func numberOfColumns() -> Int

    Objective-C

    - (NSUInteger)numberOfColumns

    Return Value

    The number of columns.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the current number of rows.

    Declaration

    Swift

    func numberOfRows() -> Int

    Objective-C

    - (NSUInteger)numberOfRows

    Return Value

    The number of rows.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the rectangle containing the specified column.

    Declaration

    Swift

    func rectOfColumn(_ columnIndex: Int) -> NSRect

    Objective-C

    - (NSRect)rectOfColumn:(NSUInteger)columnIndex

    Parameters

    columnIndex

    The column index.

    Return Value

    A rectangle containing the column. Specified in the view’s coordinate system.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the column indexes in the specified rectangle.

    Declaration

    Swift

    func columnIndexesInRect(_ rect: NSRect) -> NSIndexSet!

    Objective-C

    - (NSIndexSet *)columnIndexesInRect:(NSRect)rect

    Parameters

    rect

    The rectangle in the view’s coordinate system.

    Return Value

    An index set containing the cell indexes.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the rectangle containing the specified row.

    Declaration

    Swift

    func rectOfRow(_ rowIndex: Int) -> NSRect

    Objective-C

    - (NSRect)rectOfRow:(NSUInteger)rowIndex

    Parameters

    rowIndex

    The row index.

    Return Value

    A rectangle containing the column. Specified in the view’s coordinate system.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the row indexes in the specified rectangle.

    Declaration

    Swift

    func rowIndexesInRect(_ rect: NSRect) -> NSIndexSet!

    Objective-C

    - (NSIndexSet *)rowIndexesInRect:(NSRect)rect

    Parameters

    rect

    A rectangle in the view’s coordinate system.

    Return Value

    An index set containing the item indexes.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

Data Types

  • These constants specify the locations for dropping items onto the browser view. Used by the method setDropIndex:dropOperation:.

    Declaration

    Swift

    struct IKImageBrowserDropOperation { init(_ value: UInt32) var value: UInt32 }

    Objective-C

    typedef enum { IKImageBrowserDropOn=0, IKImageBrowserDropBefore=1, }IKImageBrowserDropOperation;

    Constants

    • IKImageBrowserDropOn

      IKImageBrowserDropOn

      Drop the item on the cell.

      Available in OS X v10.6 and later.

    • IKImageBrowserDropBefore

      IKImageBrowserDropBefore

      Drop the item before the cell.

      Available in OS X v10.6 and later.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Masks for the appearance style bit field.

    Declaration

    Objective-C

    enum{ IKCellsStyleNone =0, IKCellsStyleShadowed =1, IKCellsStyleOutlined =2, IKCellsStyleTitled =4, IKCellsStyleSubtitled =8 };

    Constants

    • IKCellsStyleNone

      IKCellsStyleNone

      No style.

      Available in OS X v10.5 and later.

    • IKCellsStyleShadowed

      IKCellsStyleShadowed

      Cells use shadows.

      Available in OS X v10.5 and later.

    • IKCellsStyleOutlined

      IKCellsStyleOutlined

      Cells are outlined.

      Available in OS X v10.5 and later.

    • IKCellsStyleTitled

      IKCellsStyleTitled

      Cells display a title.

      Available in OS X v10.5 and later.

    • IKCellsStyleSubtitled

      IKCellsStyleSubtitled

      Cells display a subtitle.

      Available in OS X v10.5 and later.

  • Attributes for the group style. Used by the

    Declaration

    Objective-C

    enum{ IKGroupBezelStyle, IKGroupDisclosureStyle, };

    Constants

    • IKGroupBezelStyle

      IKGroupBezelStyle

      A bezel style.

      Available in OS X v10.5 and later.

    • IKGroupDisclosureStyle

      IKGroupDisclosureStyle

      A disclosure triangle.

      Available in OS X v10.5 and later.

    Discussion

    These constants affect the appearance of a group.

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

    Declaration

    Swift

    let IKImageBrowserBackgroundColorKey: NSString! let IKImageBrowserSelectionColorKey: NSString! let IKImageBrowserCellsOutlineColorKey: NSString! let IKImageBrowserCellsTitleAttributesKey: NSString! let IKImageBrowserCellsHighlightedTitleAttributesKey: NSString! let IKImageBrowserCellsSubtitleAttributesKey: NSString!

    Objective-C

    NSString * const IKImageBrowserBackgroundColorKey; NSString * const IKImageBrowserSelectionColorKey; NSString * const IKImageBrowserCellsOutlineColorKey; NSString * const IKImageBrowserCellsTitleAttributesKey; NSString * const IKImageBrowserCellsHighlightedTitleAttributesKey; NSString * const IKImageBrowserCellsSubtitleAttributesKey;

    Constants

    • IKImageBrowserBackgroundColorKey

      IKImageBrowserBackgroundColorKey

      A key for the background color of the image browser view. The associated value is an NSColor object.

      Available in OS X v10.5 and later.

    • IKImageBrowserSelectionColorKey

      IKImageBrowserSelectionColorKey

      A key for the color that indicates a selection. The associated value is an NSColor object.

      Available in OS X v10.5 and later.

    • IKImageBrowserCellsOutlineColorKey

      IKImageBrowserCellsOutlineColorKey

      A key for the outline color for an item in the image browser view. The associated value is an NSColor object.

      Available in OS X v10.5 and later.

    • IKImageBrowserCellsTitleAttributesKey

      IKImageBrowserCellsTitleAttributesKey

      A key for title attribute of an item in the image browser view. The associated value is an NSDictionary object.

      Available in OS X v10.5 and later.

    • IKImageBrowserCellsHighlightedTitleAttributesKey

      IKImageBrowserCellsHighlightedTitleAttributesKey

      A key for the highlighted title attribute for an item in the image browser view. The associated value is an NSDictionary object.

      Available in OS X v10.5 and later.

    • IKImageBrowserCellsSubtitleAttributesKey

      IKImageBrowserCellsSubtitleAttributesKey

      A key for a subtitle attribute for an item in the image browser view. The associated value is an NSDictionary object.

      Available in OS X v10.5 and later.

    Discussion

  • Keys for group attributes.

    Declaration

    Swift

    let IKImageBrowserGroupRangeKey: NSString! let IKImageBrowserGroupBackgroundColorKey: NSString! let IKImageBrowserGroupTitleKey: NSString! let IKImageBrowserGroupStyleKey: NSString! let IKImageBrowserGroupHeaderLayer: NSString! let IKImageBrowserGroupFooterLayer: NSString!

    Objective-C

    NSString * const IKImageBrowserGroupRangeKey; NSString * const IKImageBrowserGroupBackgroundColorKey; NSString * const IKImageBrowserGroupTitleKey; NSString * const IKImageBrowserGroupStyleKey; NSString * const IKImageBrowserGroupHeaderLayer; NSString * const IKImageBrowserGroupFooterLayer;

    Constants

    • IKImageBrowserGroupRangeKey

      IKImageBrowserGroupRangeKey

      A key for the range of a group. The associated value is an NSValue object. This is required if the view uses grouping

      Available in OS X v10.5 and later.

    • IKImageBrowserGroupBackgroundColorKey

      IKImageBrowserGroupBackgroundColorKey

      A key for the background color of a group. The associated value is an NSColor object. This color is used only for the bezel style.

      Available in OS X v10.5 and later.

    • IKImageBrowserGroupTitleKey

      IKImageBrowserGroupTitleKey

      A key for the title of a group. The associated value is an NSString object. This string is used for the disclosure style only.

      Available in OS X v10.5 and later.

    • IKImageBrowserGroupStyleKey

      IKImageBrowserGroupStyleKey

      A key for the style of a group. The associated value is one of the constants defined in “Group Style Attributes”.

      Available in OS X v10.5 and later.

    • IKImageBrowserGroupHeaderLayer

      IKImageBrowserGroupHeaderLayer

      A key for the header layer of the group. The associated value is a CALayer.

      Available in OS X v10.6 and later.

    • IKImageBrowserGroupFooterLayer

      IKImageBrowserGroupFooterLayer

      A key for the header layer of the group. The associated value is a CALayer.

      Available in OS X v10.6 and later.