From 45b63ca0d9e1c2899a6ed5d17b526f38708b1236 Mon Sep 17 00:00:00 2001 From: dscyrescotti Date: Sat, 4 May 2024 11:26:14 +0700 Subject: [PATCH] feat: set up project --- Memola.xcodeproj/project.pbxproj | 52 ++++++++++++++++++++++++--- Memola/{ => App}/MemolaApp.swift | 2 +- Memola/ContentView.swift | 24 ------------- Memola/Features/Memo/MemoView.swift | 22 ++++++++++++ Memola/Features/Memos/MemosView.swift | 25 +++++++++++++ 5 files changed, 95 insertions(+), 30 deletions(-) rename Memola/{ => App}/MemolaApp.swift (88%) delete mode 100644 Memola/ContentView.swift create mode 100644 Memola/Features/Memo/MemoView.swift create mode 100644 Memola/Features/Memos/MemosView.swift diff --git a/Memola.xcodeproj/project.pbxproj b/Memola.xcodeproj/project.pbxproj index e7a0a62..6d0a2c7 100644 --- a/Memola.xcodeproj/project.pbxproj +++ b/Memola.xcodeproj/project.pbxproj @@ -8,17 +8,19 @@ /* Begin PBXBuildFile section */ EC7F6BEC2BE5E6E300A34A7B /* MemolaApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC7F6BEB2BE5E6E300A34A7B /* MemolaApp.swift */; }; - EC7F6BEE2BE5E6E300A34A7B /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC7F6BED2BE5E6E300A34A7B /* ContentView.swift */; }; EC7F6BF02BE5E6E400A34A7B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EC7F6BEF2BE5E6E400A34A7B /* Assets.xcassets */; }; EC7F6BF32BE5E6E400A34A7B /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EC7F6BF22BE5E6E400A34A7B /* Preview Assets.xcassets */; }; + ECA7387A2BE5EF0400A4542E /* MemosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECA738792BE5EF0400A4542E /* MemosView.swift */; }; + ECA7387D2BE5EF4B00A4542E /* MemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECA7387C2BE5EF4B00A4542E /* MemoView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ EC7F6BE82BE5E6E300A34A7B /* Memola.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Memola.app; sourceTree = BUILT_PRODUCTS_DIR; }; EC7F6BEB2BE5E6E300A34A7B /* MemolaApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MemolaApp.swift; sourceTree = ""; }; - EC7F6BED2BE5E6E300A34A7B /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; EC7F6BEF2BE5E6E400A34A7B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; EC7F6BF22BE5E6E400A34A7B /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + ECA738792BE5EF0400A4542E /* MemosView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MemosView.swift; sourceTree = ""; }; + ECA7387C2BE5EF4B00A4542E /* MemoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MemoView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -51,8 +53,8 @@ EC7F6BEA2BE5E6E300A34A7B /* Memola */ = { isa = PBXGroup; children = ( - EC7F6BEB2BE5E6E300A34A7B /* MemolaApp.swift */, - EC7F6BED2BE5E6E300A34A7B /* ContentView.swift */, + ECA738762BE5EE4E00A4542E /* App */, + ECA738772BE5EEE800A4542E /* Features */, EC7F6BEF2BE5E6E400A34A7B /* Assets.xcassets */, EC7F6BF12BE5E6E400A34A7B /* Preview Content */, ); @@ -67,6 +69,39 @@ path = "Preview Content"; sourceTree = ""; }; + ECA738762BE5EE4E00A4542E /* App */ = { + isa = PBXGroup; + children = ( + EC7F6BEB2BE5E6E300A34A7B /* MemolaApp.swift */, + ); + path = App; + sourceTree = ""; + }; + ECA738772BE5EEE800A4542E /* Features */ = { + isa = PBXGroup; + children = ( + ECA7387B2BE5EF3500A4542E /* Memo */, + ECA738782BE5EEF700A4542E /* Memos */, + ); + path = Features; + sourceTree = ""; + }; + ECA738782BE5EEF700A4542E /* Memos */ = { + isa = PBXGroup; + children = ( + ECA738792BE5EF0400A4542E /* MemosView.swift */, + ); + path = Memos; + sourceTree = ""; + }; + ECA7387B2BE5EF3500A4542E /* Memo */ = { + isa = PBXGroup; + children = ( + ECA7387C2BE5EF4B00A4542E /* MemoView.swift */, + ); + path = Memo; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -137,7 +172,8 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - EC7F6BEE2BE5E6E300A34A7B /* ContentView.swift in Sources */, + ECA7387A2BE5EF0400A4542E /* MemosView.swift in Sources */, + ECA7387D2BE5EF4B00A4542E /* MemoView.swift in Sources */, EC7F6BEC2BE5E6E300A34A7B /* MemolaApp.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -287,6 +323,9 @@ MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.example.Memola; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -316,6 +355,9 @@ MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.example.Memola; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/Memola/MemolaApp.swift b/Memola/App/MemolaApp.swift similarity index 88% rename from Memola/MemolaApp.swift rename to Memola/App/MemolaApp.swift index 99c03e4..ad3a960 100644 --- a/Memola/MemolaApp.swift +++ b/Memola/App/MemolaApp.swift @@ -11,7 +11,7 @@ import SwiftUI struct MemolaApp: App { var body: some Scene { WindowGroup { - ContentView() + MemosView() } } } diff --git a/Memola/ContentView.swift b/Memola/ContentView.swift deleted file mode 100644 index b08dc4c..0000000 --- a/Memola/ContentView.swift +++ /dev/null @@ -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() -} diff --git a/Memola/Features/Memo/MemoView.swift b/Memola/Features/Memo/MemoView.swift new file mode 100644 index 0000000..4196f5d --- /dev/null +++ b/Memola/Features/Memo/MemoView.swift @@ -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") + } + } + } +} diff --git a/Memola/Features/Memos/MemosView.swift b/Memola/Features/Memos/MemosView.swift new file mode 100644 index 0000000..6d5c43f --- /dev/null +++ b/Memola/Features/Memos/MemosView.swift @@ -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() + } + } + } +}