---
title: "appendViewController(_:animated:)"
framework: CareKit
role: symbol
role_heading: Instance Method
platforms: [iOS 13.0+, Mac Catalyst 13.0+, watchOS 7.0+]
path: "carekit/ocklistviewcontroller/appendviewcontroller(_:animated:)"
---

# appendViewController(_:animated:)

Appends a view controller’s view to the vertical stack of listed views.

## Declaration

```swift
func appendViewController(_ viewController: UIViewController, animated: Bool)
```

## Parameters

- `viewController`: The view controller you append. If the new child view controller is the child of a container view controller, the list view controller removes from that container before it appends the view controller.
- `animated`: A Boolean value that indicates whether to animate adding the view controller’s view.

## See Also

### Appending to the list

- [appendView(_:animated:)](carekit/ocklistviewcontroller/appendview(_:animated:).md)
