Skip to content

Instantly share code, notes, and snippets.

@foxicode
Created August 18, 2023 22:38
Show Gist options
  • Save foxicode/879f51bc476431d384d2460e81d35898 to your computer and use it in GitHub Desktop.
Save foxicode/879f51bc476431d384d2460e81d35898 to your computer and use it in GitHub Desktop.
SwiftUI 2 App example
import SwiftUI
@main
struct Swift2TestApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Text("Hello, world!")
}
.padding()
}
}
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