---
title: "section(forSectionIndexTitle:at:)"
framework: coredata
role: symbol
role_heading: Instance Method
path: "coredata/nsfetchedresultscontroller/section(forsectionindextitle:at:)"
---

# section(forSectionIndexTitle:at:)

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

## Declaration

```swift
func section(forSectionIndexTitle title: String, at sectionIndex: Int) -> Int
```

## Parameters

- `title`: The title of a section
- `sectionIndex`: The index of a section.

## Return Value

Return Value The section number for the given section title and index in the section index

## Discussion

Discussion You would typically call this method when executing UITableViewDataSource’s tableView(_:sectionForSectionIndexTitle:at:) method.

## See Also

### Querying Section Information

- [sections](coredata/nsfetchedresultscontroller/sections.md)
