SwiftUI/View configuration/preferredColorScheme
View のcolor schemeを設定する。ダークモード設定に使う。
Type | Instance Method |
---|---|
iOS | 14.0+ |
iPadOS | 14.0+ |
macOS | 11.0+ |
MacCatalyst | 14.0+ |
tvOS | 14.0+ |
watchOS | 7.0+ |
Website | developer |
Declaration
func preferredColorScheme(_ colorScheme: ColorScheme?) -> some View