macos: use xcodeproj

This commit is contained in:
Mitchell Hashimoto
2023-02-14 08:32:43 -08:00
parent 8035865596
commit 8fedbf84d4
18 changed files with 127 additions and 48 deletions

View File

@@ -0,0 +1,19 @@
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()
}
}

View File

@@ -1,21 +0,0 @@
import SwiftUI
import GhosttyKit
@main
struct MyApp: App {
@State private var num = ghostty_hello()
var body: some Scene {
WindowGroup {
Text(String(num))
.font(.largeTitle)
}
}
}
struct ContentView: View {
var body: some View {
Text("Ghostty")
.font(.largeTitle)
}
}

View File

@@ -0,0 +1,13 @@
import SwiftUI
import GhosttyKit
@main
struct GhosttyApp: App {
@State private var num = ghostty_hello()
var body: some Scene {
WindowGroup {
Text(String(num)).font(.largeTitle)
}
}
}