Skip to content

Instantly share code, notes, and snippets.

@SarahAlsharif
Created May 27, 2020 00:08
Show Gist options
  • Save SarahAlsharif/a5cc1aa51454e86fd9174d901884c82a to your computer and use it in GitHub Desktop.
Save SarahAlsharif/a5cc1aa51454e86fd9174d901884c82a to your computer and use it in GitHub Desktop.
import SwiftUI
struct ContentView: View {
@Environment(\.colorScheme) var colorScheme
var body: some View {
ZStack {
ZStack(alignment: .top) {
ShapeView().offset(x: -80, y : -389).shadow(radius: 12)
}
VStack {
Text(colorScheme == .light ? "Light Mode" : "Dark Mode").font(.system(size: 40)).bold().foregroundColor(colorScheme == .light ? textColorLight : textColorDark )
}.offset(y: 50).padding()
ShapeView().offset(x: 80, y : 389).shadow(radius: 12)
}.background(colorScheme == .light ? bgColorLight: bgColorDark)
.edgesIgnoringSafeArea(.all)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment