Untitled

mail@pastecode.io avatar
unknown
plain_text
8 months ago
899 B
1
Indexable
Never
import SwiftUI

struct ContentView: View {
    var body: some View {
        NavigationView {
            List {
                Section(header: Text("Graphics")) {
                    NavigationLink(destination: GraphicView()) {
                        Text("Create Graphic")
                    }
                }
            }
            .navigationBarTitle("Apple Pages")
        }
    }
}

struct GraphicView: View {
    @State private var graphicText: String = ""
    
    var body: some View {
        VStack {
            TextField("Enter text", text: $graphicText)
                .padding()
            
            Text(graphicText)
                .font(.largeTitle)
                .padding()
        }
        .navigationBarTitle("Create Graphic")
    }
}

@main
struct ApplePagesApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}