Skip to content

Instantly share code, notes, and snippets.

@haneenmahd
Created October 5, 2022 13:34
Show Gist options
  • Save haneenmahd/a6576f958bb914cd0ebf94033c08826d to your computer and use it in GitHub Desktop.
Save haneenmahd/a6576f958bb914cd0ebf94033c08826d to your computer and use it in GitHub Desktop.
Dynamic Island in SwiftUI
import SwiftUI
struct ContentView: View {
var body: some View {
ZStack {
Image("wallpaper") // get the assets here: https://github.com/haneenmahd/DynamicIsland-assets
.resizable()
.scaledToFill()
}
.preferredColorScheme(.dark)
.ignoresSafeArea()
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment