mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-07-13 00:02:43 +02:00
feat: set up project
This commit is contained in:
@@ -11,7 +11,7 @@ import SwiftUI
|
||||
struct MemolaApp: App {
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView()
|
||||
MemosView()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
//
|
||||
// ContentView.swift
|
||||
// Memola
|
||||
//
|
||||
// Created by Dscyre Scotti on 5/4/24.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ContentView: View {
|
||||
var body: some View {
|
||||
VStack {
|
||||
Image(systemName: "globe")
|
||||
.imageScale(.large)
|
||||
.foregroundStyle(.tint)
|
||||
Text("Hello, world!")
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ContentView()
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// MemoView.swift
|
||||
// Memola
|
||||
//
|
||||
// Created by Dscyre Scotti on 5/4/24.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct MemoView: View {
|
||||
@Environment(\.dismiss) var dismiss
|
||||
var body: some View {
|
||||
VStack {
|
||||
Text("Memo View")
|
||||
Button {
|
||||
dismiss()
|
||||
} label: {
|
||||
Text("Close Memo")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// MemosView.swift
|
||||
// Memola
|
||||
//
|
||||
// Created by Dscyre Scotti on 5/4/24.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct MemosView: View {
|
||||
@State var isPresented: Bool = false
|
||||
var body: some View {
|
||||
VStack {
|
||||
Text("Memos View")
|
||||
Button {
|
||||
isPresented.toggle()
|
||||
} label: {
|
||||
Text("Open Memo")
|
||||
}
|
||||
.fullScreenCover(isPresented: $isPresented) {
|
||||
MemoView()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user