---
title: restoresFocusAfterTransition
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiviewcontroller/restoresfocusaftertransition
---

# restoresFocusAfterTransition

A Boolean value that indicates whether an item that previously was focused should again become focused when the item’s view controller becomes visible and focusable.

## Declaration

```swift
var restoresFocusAfterTransition: Bool { get set }
```

## Discussion

Discussion When the value of this property is true, the item that was last focused automatically becomes focused when its view controller becomes visible and focusable. For example, if an item in the view controller is focused and a second view controller is presented, the original item becomes focused again when the second view controller is dismissed. The default value of this property is true.

## See Also

### Adding a custom transition or presentation

- [transitioningDelegate](uikit/uiviewcontroller/transitioningdelegate.md)
- [transitionCoordinator](uikit/uiviewcontroller/transitioncoordinator.md)
- [targetViewController(forAction:sender:)](uikit/uiviewcontroller/targetviewcontroller(foraction:sender:).md)
- [presentationController](uikit/uiviewcontroller/presentationcontroller.md)
- [popoverPresentationController](uikit/uiviewcontroller/popoverpresentationcontroller.md)
- [sheetPresentationController](uikit/uiviewcontroller/sheetpresentationcontroller.md)
- [activePresentationController](uikit/uiviewcontroller/activepresentationcontroller.md)
- [Customizing and resizing sheets in UIKit](uikit/customizing-and-resizing-sheets-in-uikit.md)
