Instance Property

sections

The sections for the fetch results.

Declaration

var sections: [NSFetchedResultsSectionInfo]? { get }

Discussion

The objects in the sections array implement the NSFetchedResultsSectionInfo protocol.

You typically use the sections array when implementing UITableViewDataSource methods, such as numberOfSections(in:) and tableView(_:titleForHeaderInSection:).

See Also

Querying Section Information

func section(forSectionIndexTitle: String, at: Int)

Returns the section number for a given section title and index in the section index.