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