Contents

updateSections(_:)

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

Declaration

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 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