---
title: "CFTreeGetChildAtIndex(_:_:)"
framework: Core Foundation
role: symbol
role_heading: Function
path: "corefoundation/cftreegetchildatindex(_:_:)"
---

# CFTreeGetChildAtIndex(_:_:)

Returns the child of a tree at the specified index.

## Declaration

```swift
func CFTreeGetChildAtIndex(_ tree: CFTree!, _ idx: CFIndex) -> CFTree!
```

## Parameters

- `tree`: The tree to examine.
- `idx`: The index of the child obtain. The value must be less than the number of children in tree.

## Return Value

Return Value The child tree at idx. Ownership follows the The Get Rule.

## See Also

### Examining a Tree

- [CFTreeFindRoot(_:)](corefoundation/cftreefindroot(_:).md)
- [CFTreeGetChildCount(_:)](corefoundation/cftreegetchildcount(_:).md)
- [CFTreeGetChildren(_:_:)](corefoundation/cftreegetchildren(_:_:).md)
- [CFTreeGetContext(_:_:)](corefoundation/cftreegetcontext(_:_:).md)
- [CFTreeGetFirstChild(_:)](corefoundation/cftreegetfirstchild(_:).md)
- [CFTreeGetNextSibling(_:)](corefoundation/cftreegetnextsibling(_:).md)
- [CFTreeGetParent(_:)](corefoundation/cftreegetparent(_:).md)
