Skip to content

Instantly share code, notes, and snippets.

@pedantix
Last active November 20, 2021 17:55
Show Gist options
  • Save pedantix/ef3dde6107e67ff28da77ecb8dfe5692 to your computer and use it in GitHub Desktop.
Save pedantix/ef3dde6107e67ff28da77ecb8dfe5692 to your computer and use it in GitHub Desktop.
import SwiftUI
#if DEBUG
struct PreviewGroup: ViewModifier {
func body(content: Content) -> some View {
Group {
content.preferredColorScheme(.dark)
content.preferredColorScheme(.light)
}
}
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment