---
title: previouslyFocusedIndexPath
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uicollectionviewfocusupdatecontext/previouslyfocusedindexpath
---

# previouslyFocusedIndexPath

The index path of the collection view cell that previously had the focus.

## Declaration

```swift
var previouslyFocusedIndexPath: IndexPath? { get }
```

## Discussion

Discussion This property contains an index path only when the view receiving focus belongs to a cell of the collection view. If focus was previously in a view outside of the collection view and its cells, this property is nil. This property is also nil when the collection view receives focus for the first time.

## See Also

### Locating focusable items in the collection view

- [nextFocusedIndexPath](uikit/uicollectionviewfocusupdatecontext/nextfocusedindexpath.md)
