Sets the preferred color scheme for this view.
SDKs
- iOS 13.0+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
Framework
- Swift
UI
Declaration
func preferredColorScheme(_ colorScheme: Color Scheme?) -> some View
Sets the preferred color scheme for this view.
SDKs
Framework
func preferredColorScheme(_ colorScheme: Color Scheme?) -> some View