<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPListTemplate/updateSections(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPListTemplate(im)updateSections:"
  },
  "title" : "updateSections(_:)"
}
-->

# updateSections(_:)

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

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

## Parameters

`sections`

An array of sections to display.

## 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`](/documentation/CarPlay/CPListTemplate/maximumSectionCount) to determine the maximum number of sections the list can display. CarPlay trims the array if its size exceeds this limit.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)