Instance Method
インスタンスメソッド
preference(key:
preference(key:value:)
Sets a value for the given preference.
Availability 有効性
- iOS 13.0+
- iPadOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
Technology
- Swift
UI
Declaration 宣言
func preference<K>(key: K.Type = K.self, value: K.Value) -> some View
where K : PreferenceKey