<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSFetchedResultsControllerDelegate/controller(_:sectionIndexTitleForSectionName:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(pl)NSFetchedResultsControllerDelegate(im)controller:sectionIndexTitleForSectionName:"
  },
  "title" : "controller(_:sectionIndexTitleForSectionName:)"
}
-->

# controller(_:sectionIndexTitleForSectionName:)

Returns the name for a given section.

```
optional func controller(_ controller: NSFetchedResultsController<any NSFetchRequestResult>, sectionIndexTitleForSectionName sectionName: String) -> String?
```

## Parameters

`controller`

The fetched results controller that sent the message.

`sectionName`

The default name of the section.

## Return Value

The string to use as the name for the specified section.

## Discussion

This method does not enable change tracking. It is only needed if a section index is used.

If the delegate doesn’t implement this method, the default implementation returns the capitalized first letter of the section name (see [`sectionIndexTitle(forSectionName:)`](/documentation/CoreData/NSFetchedResultsController/sectionIndexTitle(forSectionName:)) in `NSFetchedResultsController`).

---

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)