---
title: "focusedSceneValue(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/focusedscenevalue(_:)"
---

# focusedSceneValue(_:)

Sets the focused value for the given object type at a scene-wide scope.

## Declaration

```swift
nonisolated func focusedSceneValue<T>(_ object: T?) -> some View where T : AnyObject, T : Observable

```

## Mentioned in

Building and customizing the menu bar with SwiftUI

## Discussion

Discussion important: This initializer only accepts objects conforming to the Observable protocol. For reading environment objects that conform to ObservableObject, use focusedObject(_:), instead. To read this value, use the FocusedValue property wrapper.

## See Also

### Exposing value types to focused views

- [focusedValue(_:)](swiftui/view/focusedvalue(_:).md)
- [focusedValue(_:_:)](swiftui/view/focusedvalue(_:_:).md)
- [focusedSceneValue(_:_:)](swiftui/view/focusedscenevalue(_:_:).md)
- [FocusedValues](swiftui/focusedvalues.md)
