Mac Developer Library

Developer

Quartz Framework Reference IKImageBrowserCell Class Reference

Options
Deployment Target:

On This Page
Language:

IKImageBrowserCell

Inheritance


Conforms To


Import Statement


Swift

import Quartz

Objective-C

@import Quartz;

Availability


Available in OS X v10.6 and later.

The IKImageBrowserCell class is used to display a cell conforming to the IKImageBrowserItem Protocol protocol in an IKImageBrowserView.

  • Returns the receiver’s frame rectangle, which defines its position in its IKImageBrowserView.

    Declaration

    Swift

    func frame() -> NSRect

    Objective-C

    - (NSRect)frame

    Return Value

    The coordinates of the frame, in the IKImageBrowserView coordinate space.

    Discussion

    Subclasses should not override this method.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the receiver’s image frame rectangle, which defines the position of the thumbnail in its IKImageBrowserView.

    Declaration

    Swift

    func imageFrame() -> NSRect

    Objective-C

    - (NSRect)imageFrame

    Return Value

    The coordinates of the frame, in the IKImageBrowserView coordinate space.

    Discussion

    It is the developer’s responsibility to compute the imageFrame such that it lies entirely within the cell’s frame rectangle.

    Subclasses can override this method to customize the position of the thumbnail.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the receiver’s subtitle frame rectangle.

    Declaration

    Swift

    func subtitleFrame() -> NSRect

    Objective-C

    - (NSRect)subtitleFrame

    Return Value

    The coordinates of the subtitle frame, in the IKImageBrowserView coordinate space.

    Discussion

    It is the developer’s responsibility to compute the subtitleFrame such that it lies entirely within the cell’s frame rectangle.

    Subclasses can override this method to customize the position of the subtitle.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the receiver’s title frame rectangle.

    Declaration

    Swift

    func titleFrame() -> NSRect

    Objective-C

    - (NSRect)titleFrame

    Return Value

    The coordinates of the title frame, in the IKImageBrowserView coordinate space.

    Discussion

    It is the developer’s responsibility to compute the titleFrame such that it lies entirely within the cell’s frame rectangle.

    Subclasses can override this method to customize the position of the title.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the receiver’s image container frame rectangle, which defines the position of the container of the thumbnail.

    Declaration

    Swift

    func imageContainerFrame() -> NSRect

    Objective-C

    - (NSRect)imageContainerFrame

    Return Value

    The coordinates of image container frame, in the IKImageBrowserView coordinate space.

    Discussion

    The image frame is computed automatically from the image container frame by taking in account the image alignment and the image aspect ratio.

    Subclasses can override this method to customize the position of the thumbnail container.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the index of the receiver’s represented object in the datasource.

    Declaration

    Swift

    func indexOfRepresentedItem() -> Int

    Objective-C

    - (NSUInteger)indexOfRepresentedItem

    Return Value

    The index of the represented object in the datasource.

    Discussion

    Subclasses should not override this method.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the receiver’s represented object.

    Declaration

    Swift

    func representedItem() -> AnyObject!

    Objective-C

    - (id)representedItem

    Return Value

    The item represented by the cell.

    Discussion

    Subclasses should not override this method.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns whether the cell is selected.

    Declaration

    Swift

    func isSelected() -> Bool

    Objective-C

    - (BOOL)isSelected

    Return Value

    YEStrue if the cell is selected, otherwise NOfalse.

    Discussion

    Subclasses should not override this method.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the receiver’s selection frame rectangle, which defines the position of the selection rectangle in its IKImageBrowserView.

    Declaration

    Swift

    func selectionFrame() -> NSRect

    Objective-C

    - (NSRect)selectionFrame

    Return Value

    The cells selection frame, in the IKImageBrowserView coordinate space.

    Discussion

    Subclasses can override this method to customize the position of the selection frame.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the position of the cell’s image in the frame.

    Declaration

    Swift

    func imageAlignment() -> NSImageAlignment

    Objective-C

    - (NSImageAlignment)imageAlignment

    Return Value

    The alignment of the image. See NSImageAlignment for possible values.

    Discussion

    Subclasses can override this method to customize the image alignment.

    The image frame will be computed automatically from the image container frame by taking in account the image alignment and the image aspect ratio.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the opacity of the receiver.

    Declaration

    Swift

    func opacity() -> CGFloat

    Objective-C

    - (CGFloat)opacity

    Return Value

    The cell’s opacity.

    Discussion

    Possible values are between 0.0 (transparent) and 1.0 (opaque).

    Subclasses can override this method to customize the opacity of the cell.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the current cell state of the receiver.

    Declaration

    Swift

    func cellState() -> IKImageBrowserCellState

    Objective-C

    - (IKImageBrowserCellState)cellState

    Return Value

    The current state of the cell. See IKImageBrowserCellState for possible values.

    Discussion

    The IKImageBrowserView creates thumbnails asynchronously. This method returns the current state.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns a layer for the specified position.

    Declaration

    Swift

    func layerForType(_ type: String!) -> CALayer!

    Objective-C

    - (CALayer *)layerForType:(NSString *)type

    Parameters

    type

    A string representing the layer location. See Cell Layer Positions for possible values.

    Return Value

    The CALayer to display in the specified position.

    Discussion

    Subclasses can override this method to add a Core Animation layer to the cell

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • Returns the view the receiver uses to display the cell.

    Declaration

    Swift

    func imageBrowserView() -> IKImageBrowserView!

    Objective-C

    - (IKImageBrowserView *)imageBrowserView

    Return Value

    The browser view containing the cell.

    Discussion

    Subclasses should not override this method.

    Import Statement

    Objective-C

    @import Quartz;

    Swift

    import Quartz

    Availability

    Available in OS X v10.6 and later.

  • The possible states for the browser cell. These values are used by the cellState method.

    Declaration

    Swift

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

    Objective-C

    typedef enum{ IKImageStateNoImage =0, IKImageStateInvalid, IKImageStateReady, } IKImageBrowserCellState;

    Constants

    • IKImageStateNoImage

      IKImageStateNoImage

      Returned until a thumbnail has been created from the represented object.

      Available in OS X v10.6 and later.

    • IKImageStateInvalid

      IKImageStateInvalid

      The thumbnail is invalid. For example, an unsupported image is provided.

      Available in OS X v10.6 and later.

    • IKImageStateReady

      IKImageStateReady

      The receiver’s represented object has been set and the cell is ready to display.

      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.

  • Optional positioning of additional layers displayed with the cell. Used by the layerForType: method.

    Declaration

    Swift

    let IKImageBrowserCellBackgroundLayer: String let IKImageBrowserCellForegroundLayer: String let IKImageBrowserCellSelectionLayer: String let IKImageBrowserCellPlaceHolderLayer: String

    Objective-C

    NSString *const IKImageBrowserCellBackgroundLayer; NSString *const IKImageBrowserCellForegroundLayer; NSString *const IKImageBrowserCellSelectionLayer; NSString *const IKImageBrowserCellPlaceHolderLayer;

    Constants

    • IKImageBrowserCellBackgroundLayer

      IKImageBrowserCellBackgroundLayer

      Layer displayed in the background.

      Available in OS X v10.6 and later.

    • IKImageBrowserCellForegroundLayer

      IKImageBrowserCellForegroundLayer

      Layer displayed in the foreground.

      Available in OS X v10.6 and later.

    • IKImageBrowserCellSelectionLayer

      IKImageBrowserCellSelectionLayer

      Layer displayed as the selection.

      Available in OS X v10.6 and later.

    • IKImageBrowserCellPlaceHolderLayer

      IKImageBrowserCellPlaceHolderLayer

      Layer displayed as a placeholder when an image is not yet available.

      Available in OS X v10.6 and later.