Mac OS X Reference Library Apple Developer
Search

NSCollectionViewItem Class Reference

Inherits from
Conforms to
NSCopying
NSCoding (NSViewController)
NSCoding (NSResponder)
NSObject (NSObject)
NSEditor (Informal Protocol) (NSViewController)
NSEditorRegistration (Informal Protocol) (NSViewController)
Framework
/System/Library/Frameworks/AppKit.framework
Availability
Available in Mac OS X v10.5 and later.
Declared in
NSCollectionView.h

Overview

NSCollectionViewItem class is a controller that manages the relationship between a compound view and the model object that provides its content. Instances of this class are replicated in a NSCollectionView.

Important: In Mac OS X v10.5, the superclass of the NSCollectionViewItem class was NSObject. In Mac OS X v10.6 and later, NSCollectionViewItem is now a subclass of NSViewController. This change was made to improve how the view is replicated within the NSCollectionView. NSCollectionViewItem remains binary compatible with the previous implementation and unarchiving is correctly handled.

Tasks

Setting the Represented Object

Modifying the View

Managing the Selection

Parent Collection View

Instance Methods

collectionView

Returns the receiver’s collection view.

- (NSCollectionView *)collectionView

Return Value

The receiver’s collection view.

Availability
  • Available in Mac OS X v10.5 and later.
Declared In
NSCollectionView.h

isSelected

Returns the selection state of the receiver.

- (BOOL)isSelected

Return Value

YES if the receiver is selected, otherwise NO.

Availability
  • Available in Mac OS X v10.5 and later.
Declared In
NSCollectionView.h

setSelected:

Sets the selection state of the receiver.

- (void)setSelected:(BOOL)flag

Parameters
flag

YES if the receiver is selected, otherwise NO.

Availability
  • Available in Mac OS X v10.5 and later.
Declared In
NSCollectionView.h



Last updated: 2009-05-01

Did this document help you? Yes It's good, but... Not helpful...