---
title: "child(at:)"
framework: pdfkit
role: symbol
role_heading: Instance Method
path: "pdfkit/pdfoutline/child(at:)"
---

# child(at:)

Returns the child outline object at the specified index.

## Declaration

```swift
func child(at index: Int) -> PDFOutline?
```

## Discussion

Discussion The index is zero-based. This method throws an exception if index is out of range. important: In macOS 10.5 and later, a PDFOutline object retains all its children, so childAtIndex: returns the same retained child outline object every time it’s called. This means that you do not need to retain the object returned by childAtIndex:. This differs from the behavior of PDFOutline in OS X v10.4. In Tiger, childAtIndex: returns an auto-released, one-off child outline object, when meant that you had to include code to retain the child.

## See Also

### Getting Information About an Outline

- [document](pdfkit/pdfoutline/document.md)
- [numberOfChildren](pdfkit/pdfoutline/numberofchildren.md)
- [parent](pdfkit/pdfoutline/parent.md)
- [index](pdfkit/pdfoutline/index.md)
