<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionViewDelegate/collectionView(_:selectionFollowsFocusForItemAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UICollectionViewDelegate(im)collectionView:selectionFollowsFocusForItemAtIndexPath:"
  },
  "title" : "collectionView(_:selectionFollowsFocusForItemAt:)"
}
-->

# collectionView(_:selectionFollowsFocusForItemAt:)

Asks the delegate whether to relate selection and focus behavior for the cell at the corresponding index path.

```
optional func collectionView(_ collectionView: UICollectionView, selectionFollowsFocusForItemAt indexPath: IndexPath) -> Bool
```

## Parameters

`collectionView`

The collection view making the request.

`indexPath`

The index path of the cell to determine selection and focus behavior for.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if you want to automatically select the cell at the specified index path when focus moves to it; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

If the collection view’s [`selectionFollowsFocus`](/documentation/UIKit/UICollectionView/selectionFollowsFocus) property is <doc://com.apple.documentation/documentation/Swift/true> and you return <doc://com.apple.documentation/documentation/Swift/false> from this delegate method, focus still moves to the cell when the user selects it. However, when focus moves to the cell, the cell doesn’t automatically select.

---

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)