The user defaults to use as the default store for App
.
Instance Method
インスタンスメソッド
default
defaultAppStorage(_:)
The default store used by
AppStorage
contained within the scene and its view content.
シーンとそれのビュー内容内に含まれるAppStorage
によって使われる省略時記憶装置(デフォルトストア)。
Availability 有効性
- iOS 14.0+
- iPadOS 14.0+
- macOS 11.0+
- Mac Catalyst 14.0+
- tvOS 14.0+
- watchOS 7.0+
Technology
- Swift
UI
Declaration 宣言
func defaultAppStorage(_ store: UserDefaults
) -> some Scene
Parameters パラメータ
store
Storage
Discussion 議論
If unspecified, the default store for a view hierarchy is User
, but can be set a to a custom one. For example, sharing defaults between an app and an extension can override the default store to one created with User
.