---
title: children
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsviewcontroller/children
---

# children

An array of view controllers that are hierarchical children of the view controller.

## Declaration

```swift
var children: [NSViewController] { get set }
```

## Discussion

Discussion You can add or remove child view controllers by using this property. When you do, the addChild(_:) or removeFromParent() method gets called accordingly.

## See Also

### Managing Child View Controllers in a Custom Container

- [addChild(_:)](appkit/nsviewcontroller/addchild(_:).md)
- [transition(from:to:options:completionHandler:)](appkit/nsviewcontroller/transition(from:to:options:completionhandler:).md)
- [insertChild(_:at:)](appkit/nsviewcontroller/insertchild(_:at:).md)
- [removeChild(at:)](appkit/nsviewcontroller/removechild(at:).md)
- [removeFromParent()](appkit/nsviewcontroller/removefromparent().md)
- [preferredContentSizeDidChange(for:)](appkit/nsviewcontroller/preferredcontentsizedidchange(for:).md)
