<!--
{
  "availability" : [
    "macOS: 12.0.0 -",
    "tvOS: 14.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ResetFocusAction",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI16ResetFocusActionV"
  },
  "title" : "ResetFocusAction"
}
-->

# ResetFocusAction

An environment value that provides the ability to reevaluate default
focus.

```
struct ResetFocusAction
```

## Overview

Get the [`resetFocus`](/documentation/SwiftUI/EnvironmentValues/resetFocus) environment value and call it as a
function to force a default focus reevaluation at runtime.

```
@Namespace var mainNamespace
@Environment(\.resetFocus) var resetFocus

var body: some View {
    // ...
    resetFocus(in: mainNamespace)
    // ...
}
```

## Topics

### Calling the action

[`callAsFunction(in:)`](/documentation/SwiftUI/ResetFocusAction/callAsFunction(in:))

Asks the focus sytem to reevaluate the default focus item.



---

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)