Instance Method

child:ofItem:

Returns the specified child of an item.

Declaration

- (id)child:(NSInteger)index ofItem:(id)item;

Parameters

index

The index of the child item in the parent.

item

The parent item whose child item you want to retrieve.

Return Value

The child item or nil if the item could not be found.

Discussion

You can call this method on an outline view with either a static or dynamic data source. For an outline view whose contents are dynamic, this method may call out to the outlineView:child:ofItem: method of the associated data source object.

See Also

Getting Related Items

- parentForItem:

Returns the parent for a given item.

- childIndexForItem:

Returns the child index of the specified item within its parent.

- numberOfChildrenOfItem:

Returns the number of children for the specified parent item.