---
title: "updateSections(_:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cplisttemplate/updatesections(_:)"
---

# updateSections(_:)

Adds, removes, reorders, or updates the list’s sections.

## Declaration

```swift
func updateSections(_ sections: [CPListSection])
```

## Parameters

- `sections`: An array of sections to display.

## Discussion

Discussion This method is multipurpose. Use it to add new sections to the list, to remove or reorder existing sections, and to update a section’s appearance. At runtime, use maximumSectionCount to determine the maximum number of sections the list can display. CarPlay trims the array if its size exceeds this limit.

## See Also

### Managing Sections

- [maximumSectionCount](carplay/cplisttemplate/maximumsectioncount.md)
- [sectionCount](carplay/cplisttemplate/sectioncount.md)
- [sections](carplay/cplisttemplate/sections.md)
- [CPListSection](carplay/cplistsection.md)
