From 8b6ab5b675fb6812c89e6602a9b066a1bfdd8daf Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 12:35:31 +0900 Subject: [PATCH 01/46] =?UTF-8?q?Chore:=20Firebase=20=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GoogleService-Info.plist 파일 추가 --- .../ProjectManager.xcodeproj/project.pbxproj | 21 ++++ .../xcshareddata/swiftpm/Package.resolved | 117 ++++++++++++++++++ .../ProjectManager/GoogleService-Info.plist | 30 +++++ 3 files changed, 168 insertions(+) create mode 100644 ProjectManager/ProjectManager/GoogleService-Info.plist diff --git a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj index d5f131b5f..126c90f05 100644 --- a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj +++ b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 3C353EF92B60B9E70006509D /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3C353EF82B60B9E70006509D /* GoogleService-Info.plist */; }; + 3C353EFC2B60BC8B0006509D /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353EFB2B60BC8B0006509D /* FirebaseAnalytics */; }; 3C8D87FE2B5FB98000D7BD42 /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FD2B5FB98000D7BD42 /* Realm */; }; 3C8D88002B5FB98000D7BD42 /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FF2B5FB98000D7BD42 /* RealmSwift */; }; C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0525F51E1D0094C4CF /* AppDelegate.swift */; }; @@ -17,6 +19,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 3C353EF82B60B9E70006509D /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; C7431F0225F51E1D0094C4CF /* ProjectManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProjectManager.app; sourceTree = BUILT_PRODUCTS_DIR; }; C7431F0525F51E1D0094C4CF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; C7431F0725F51E1D0094C4CF /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -33,6 +36,7 @@ files = ( 3C8D88002B5FB98000D7BD42 /* RealmSwift in Frameworks */, 3C8D87FE2B5FB98000D7BD42 /* Realm in Frameworks */, + 3C353EFC2B60BC8B0006509D /* FirebaseAnalytics in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -64,6 +68,7 @@ C7431F0E25F51E1E0094C4CF /* Assets.xcassets */, C7431F1025F51E1E0094C4CF /* LaunchScreen.storyboard */, C7431F1325F51E1E0094C4CF /* Info.plist */, + 3C353EF82B60B9E70006509D /* GoogleService-Info.plist */, ); path = ProjectManager; sourceTree = ""; @@ -87,6 +92,7 @@ packageProductDependencies = ( 3C8D87FD2B5FB98000D7BD42 /* Realm */, 3C8D87FF2B5FB98000D7BD42 /* RealmSwift */, + 3C353EFB2B60BC8B0006509D /* FirebaseAnalytics */, ); productName = ProjectManager; productReference = C7431F0225F51E1D0094C4CF /* ProjectManager.app */; @@ -118,6 +124,7 @@ mainGroup = C7431EF925F51E1D0094C4CF; packageReferences = ( 3C8D87FC2B5FB98000D7BD42 /* XCRemoteSwiftPackageReference "realm-swift" */, + 3C353EFA2B60BC8B0006509D /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, ); productRefGroup = C7431F0325F51E1D0094C4CF /* Products */; projectDirPath = ""; @@ -135,6 +142,7 @@ files = ( C7431F1225F51E1E0094C4CF /* LaunchScreen.storyboard in Resources */, C7431F0F25F51E1E0094C4CF /* Assets.xcassets in Resources */, + 3C353EF92B60B9E70006509D /* GoogleService-Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -345,6 +353,14 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ + 3C353EFA2B60BC8B0006509D /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 10.20.0; + }; + }; 3C8D87FC2B5FB98000D7BD42 /* XCRemoteSwiftPackageReference "realm-swift" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/realm/realm-swift"; @@ -356,6 +372,11 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 3C353EFB2B60BC8B0006509D /* FirebaseAnalytics */ = { + isa = XCSwiftPackageProductDependency; + package = 3C353EFA2B60BC8B0006509D /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseAnalytics; + }; 3C8D87FD2B5FB98000D7BD42 /* Realm */ = { isa = XCSwiftPackageProductDependency; package = 3C8D87FC2B5FB98000D7BD42 /* XCRemoteSwiftPackageReference "realm-swift" */; diff --git a/ProjectManager/ProjectManager.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ProjectManager/ProjectManager.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 3a32c3f7c..6f68d0e7d 100644 --- a/ProjectManager/ProjectManager.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ProjectManager/ProjectManager.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,113 @@ { "pins" : [ + { + "identity" : "abseil-cpp-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/abseil-cpp-binary.git", + "state" : { + "revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c", + "version" : "1.2022062300.0" + } + }, + { + "identity" : "app-check", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/app-check.git", + "state" : { + "revision" : "3e464dad87dad2d29bb29a97836789bf0f8f67d2", + "version" : "10.18.1" + } + }, + { + "identity" : "firebase-ios-sdk", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/firebase-ios-sdk.git", + "state" : { + "revision" : "b880ec8ec927a838c51c12862c6222c30d7097d7", + "version" : "10.20.0" + } + }, + { + "identity" : "googleappmeasurement", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleAppMeasurement.git", + "state" : { + "revision" : "ceec9f28dea12b7cf3dabf18b5ed7621c88fd4aa", + "version" : "10.20.0" + } + }, + { + "identity" : "googledatatransport", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleDataTransport.git", + "state" : { + "revision" : "a732a4b47f59e4f725a2ea10f0c77e93a7131117", + "version" : "9.3.0" + } + }, + { + "identity" : "googleutilities", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/GoogleUtilities.git", + "state" : { + "revision" : "bc27fad73504f3d4af235de451f02ee22586ebd3", + "version" : "7.12.1" + } + }, + { + "identity" : "grpc-binary", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/grpc-binary.git", + "state" : { + "revision" : "a673bc2937fbe886dd1f99c401b01b6d977a9c98", + "version" : "1.49.1" + } + }, + { + "identity" : "gtm-session-fetcher", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/gtm-session-fetcher.git", + "state" : { + "revision" : "115f75e43851774934d695449a4836123c3246e1", + "version" : "3.2.0" + } + }, + { + "identity" : "interop-ios-for-google-sdks", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/interop-ios-for-google-sdks.git", + "state" : { + "revision" : "2d12673670417654f08f5f90fdd62926dc3a2648", + "version" : "100.0.0" + } + }, + { + "identity" : "leveldb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/leveldb.git", + "state" : { + "revision" : "9d108e9112aa1d65ce508facf804674546116d9c", + "version" : "1.22.3" + } + }, + { + "identity" : "nanopb", + "kind" : "remoteSourceControl", + "location" : "https://github.com/firebase/nanopb.git", + "state" : { + "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692", + "version" : "2.30909.0" + } + }, + { + "identity" : "promises", + "kind" : "remoteSourceControl", + "location" : "https://github.com/google/promises.git", + "state" : { + "revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e", + "version" : "2.3.1" + } + }, { "identity" : "realm-core", "kind" : "remoteSourceControl", @@ -17,6 +125,15 @@ "branch" : "master", "revision" : "6a0054aa874a6d441d1323b2ba25780738d9d2af" } + }, + { + "identity" : "swift-protobuf", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-protobuf.git", + "state" : { + "revision" : "65e8f29b2d63c4e38e736b25c27b83e012159be8", + "version" : "1.25.2" + } } ], "version" : 2 diff --git a/ProjectManager/ProjectManager/GoogleService-Info.plist b/ProjectManager/ProjectManager/GoogleService-Info.plist new file mode 100644 index 000000000..8110e3b3a --- /dev/null +++ b/ProjectManager/ProjectManager/GoogleService-Info.plist @@ -0,0 +1,30 @@ + + + + + API_KEY + AIzaSyA5Zc5BbSxwVOlyhRNRVMggdPpMt9mraK8 + GCM_SENDER_ID + 814846749503 + PLIST_VERSION + 1 + BUNDLE_ID + net.yagom.ProjectManager + PROJECT_ID + projectmanager-bf916 + STORAGE_BUCKET + projectmanager-bf916.appspot.com + IS_ADS_ENABLED + + IS_ANALYTICS_ENABLED + + IS_APPINVITE_ENABLED + + IS_GCM_ENABLED + + IS_SIGNIN_ENABLED + + GOOGLE_APP_ID + 1:814846749503:ios:f898427fb13b50f311818a + + \ No newline at end of file From 2cf8280f3d22aef7ab563c26d76475e4ea66d02c Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 12:37:59 +0900 Subject: [PATCH 02/46] =?UTF-8?q?feat:=20Firebase=20=EC=97=B0=EA=B2=B0=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/AppDelegate.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/AppDelegate.swift b/ProjectManager/ProjectManager/AppDelegate.swift index 8df091a06..c8773cc40 100644 --- a/ProjectManager/ProjectManager/AppDelegate.swift +++ b/ProjectManager/ProjectManager/AppDelegate.swift @@ -5,6 +5,7 @@ // import UIKit +import FirebaseCore @main class AppDelegate: UIResponder, UIApplicationDelegate { @@ -12,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. + FirebaseApp.configure() return true } From 45af3d57dbb7a01d1101d2a6525b07961e4b7508 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 12:49:36 +0900 Subject: [PATCH 03/46] =?UTF-8?q?Chore:=20RxSwift=20=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EB=B8=8C=EB=9F=AC=EB=A6=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager.xcodeproj/project.pbxproj | 33 +++++++++++++++++++ .../xcshareddata/swiftpm/Package.resolved | 9 +++++ 2 files changed, 42 insertions(+) diff --git a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj index 126c90f05..002ef2840 100644 --- a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj +++ b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj @@ -9,6 +9,9 @@ /* Begin PBXBuildFile section */ 3C353EF92B60B9E70006509D /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3C353EF82B60B9E70006509D /* GoogleService-Info.plist */; }; 3C353EFC2B60BC8B0006509D /* FirebaseAnalytics in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353EFB2B60BC8B0006509D /* FirebaseAnalytics */; }; + 3C353F0B2B60BFE00006509D /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353F0A2B60BFE00006509D /* RxCocoa */; }; + 3C353F0F2B60BFE00006509D /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353F0E2B60BFE00006509D /* RxRelay */; }; + 3C353F132B60BFE00006509D /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353F122B60BFE00006509D /* RxSwift */; }; 3C8D87FE2B5FB98000D7BD42 /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FD2B5FB98000D7BD42 /* Realm */; }; 3C8D88002B5FB98000D7BD42 /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FF2B5FB98000D7BD42 /* RealmSwift */; }; C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0525F51E1D0094C4CF /* AppDelegate.swift */; }; @@ -34,9 +37,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 3C353F0B2B60BFE00006509D /* RxCocoa in Frameworks */, + 3C353F132B60BFE00006509D /* RxSwift in Frameworks */, 3C8D88002B5FB98000D7BD42 /* RealmSwift in Frameworks */, 3C8D87FE2B5FB98000D7BD42 /* Realm in Frameworks */, 3C353EFC2B60BC8B0006509D /* FirebaseAnalytics in Frameworks */, + 3C353F0F2B60BFE00006509D /* RxRelay in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -93,6 +99,9 @@ 3C8D87FD2B5FB98000D7BD42 /* Realm */, 3C8D87FF2B5FB98000D7BD42 /* RealmSwift */, 3C353EFB2B60BC8B0006509D /* FirebaseAnalytics */, + 3C353F0A2B60BFE00006509D /* RxCocoa */, + 3C353F0E2B60BFE00006509D /* RxRelay */, + 3C353F122B60BFE00006509D /* RxSwift */, ); productName = ProjectManager; productReference = C7431F0225F51E1D0094C4CF /* ProjectManager.app */; @@ -125,6 +134,7 @@ packageReferences = ( 3C8D87FC2B5FB98000D7BD42 /* XCRemoteSwiftPackageReference "realm-swift" */, 3C353EFA2B60BC8B0006509D /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, + 3C353F052B60BFE00006509D /* XCRemoteSwiftPackageReference "RxSwift" */, ); productRefGroup = C7431F0325F51E1D0094C4CF /* Products */; projectDirPath = ""; @@ -361,6 +371,14 @@ minimumVersion = 10.20.0; }; }; + 3C353F052B60BFE00006509D /* XCRemoteSwiftPackageReference "RxSwift" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/ReactiveX/RxSwift.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 6.6.0; + }; + }; 3C8D87FC2B5FB98000D7BD42 /* XCRemoteSwiftPackageReference "realm-swift" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/realm/realm-swift"; @@ -377,6 +395,21 @@ package = 3C353EFA2B60BC8B0006509D /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; productName = FirebaseAnalytics; }; + 3C353F0A2B60BFE00006509D /* RxCocoa */ = { + isa = XCSwiftPackageProductDependency; + package = 3C353F052B60BFE00006509D /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxCocoa; + }; + 3C353F0E2B60BFE00006509D /* RxRelay */ = { + isa = XCSwiftPackageProductDependency; + package = 3C353F052B60BFE00006509D /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxRelay; + }; + 3C353F122B60BFE00006509D /* RxSwift */ = { + isa = XCSwiftPackageProductDependency; + package = 3C353F052B60BFE00006509D /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxSwift; + }; 3C8D87FD2B5FB98000D7BD42 /* Realm */ = { isa = XCSwiftPackageProductDependency; package = 3C8D87FC2B5FB98000D7BD42 /* XCRemoteSwiftPackageReference "realm-swift" */; diff --git a/ProjectManager/ProjectManager.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ProjectManager/ProjectManager.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 6f68d0e7d..e977211af 100644 --- a/ProjectManager/ProjectManager.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ProjectManager/ProjectManager.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -126,6 +126,15 @@ "revision" : "6a0054aa874a6d441d1323b2ba25780738d9d2af" } }, + { + "identity" : "rxswift", + "kind" : "remoteSourceControl", + "location" : "https://github.com/ReactiveX/RxSwift.git", + "state" : { + "revision" : "9dcaa4b333db437b0fbfaf453fad29069044a8b4", + "version" : "6.6.0" + } + }, { "identity" : "swift-protobuf", "kind" : "remoteSourceControl", From 8394babfe087f29f60c7b6ff3cb72a46dc240232 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 16:17:12 +0900 Subject: [PATCH 04/46] =?UTF-8?q?Move:=20MVVM=20=ED=8C=A8=ED=84=B4?= =?UTF-8?q?=EC=97=90=20=EB=A7=9E=EC=B6=B0=20=ED=8C=8C=EC=9D=BC=20=EA=B7=B8?= =?UTF-8?q?=EB=A3=B9=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager.xcodeproj/project.pbxproj | 38 +++++++++++++++++-- .../AccentColor.colorset/Contents.json | 0 .../AppIcon.appiconset/Contents.json | 0 .../Assets.xcassets/Contents.json | 0 .../Base.lproj/LaunchScreen.storyboard | 0 .../{ => View}/ViewController.swift | 2 +- 6 files changed, 36 insertions(+), 4 deletions(-) rename ProjectManager/ProjectManager/{ => Helper}/Assets.xcassets/AccentColor.colorset/Contents.json (100%) rename ProjectManager/ProjectManager/{ => Helper}/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename ProjectManager/ProjectManager/{ => Helper}/Assets.xcassets/Contents.json (100%) rename ProjectManager/ProjectManager/{ => Helper}/Base.lproj/LaunchScreen.storyboard (100%) rename ProjectManager/ProjectManager/{ => View}/ViewController.swift (80%) diff --git a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj index 002ef2840..bb1ea39f5 100644 --- a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj +++ b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj @@ -49,6 +49,37 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 3C8BE8E42B60EDF6006C66DB /* Model */ = { + isa = PBXGroup; + children = ( + ); + path = Model; + sourceTree = ""; + }; + 3C8BE8E52B60EE02006C66DB /* View */ = { + isa = PBXGroup; + children = ( + C7431F0925F51E1D0094C4CF /* ViewController.swift */, + ); + path = View; + sourceTree = ""; + }; + 3C8BE8E62B60EE0B006C66DB /* ViewModel */ = { + isa = PBXGroup; + children = ( + ); + path = ViewModel; + sourceTree = ""; + }; + 3C8BE8E72B60EFDB006C66DB /* Helper */ = { + isa = PBXGroup; + children = ( + C7431F0E25F51E1E0094C4CF /* Assets.xcassets */, + C7431F1025F51E1E0094C4CF /* LaunchScreen.storyboard */, + ); + path = Helper; + sourceTree = ""; + }; C7431EF925F51E1D0094C4CF = { isa = PBXGroup; children = ( @@ -70,9 +101,10 @@ children = ( C7431F0525F51E1D0094C4CF /* AppDelegate.swift */, C7431F0725F51E1D0094C4CF /* SceneDelegate.swift */, - C7431F0925F51E1D0094C4CF /* ViewController.swift */, - C7431F0E25F51E1E0094C4CF /* Assets.xcassets */, - C7431F1025F51E1E0094C4CF /* LaunchScreen.storyboard */, + 3C8BE8E42B60EDF6006C66DB /* Model */, + 3C8BE8E52B60EE02006C66DB /* View */, + 3C8BE8E62B60EE0B006C66DB /* ViewModel */, + 3C8BE8E72B60EFDB006C66DB /* Helper */, C7431F1325F51E1E0094C4CF /* Info.plist */, 3C353EF82B60B9E70006509D /* GoogleService-Info.plist */, ); diff --git a/ProjectManager/ProjectManager/Assets.xcassets/AccentColor.colorset/Contents.json b/ProjectManager/ProjectManager/Helper/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from ProjectManager/ProjectManager/Assets.xcassets/AccentColor.colorset/Contents.json rename to ProjectManager/ProjectManager/Helper/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/ProjectManager/ProjectManager/Assets.xcassets/AppIcon.appiconset/Contents.json b/ProjectManager/ProjectManager/Helper/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from ProjectManager/ProjectManager/Assets.xcassets/AppIcon.appiconset/Contents.json rename to ProjectManager/ProjectManager/Helper/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/ProjectManager/ProjectManager/Assets.xcassets/Contents.json b/ProjectManager/ProjectManager/Helper/Assets.xcassets/Contents.json similarity index 100% rename from ProjectManager/ProjectManager/Assets.xcassets/Contents.json rename to ProjectManager/ProjectManager/Helper/Assets.xcassets/Contents.json diff --git a/ProjectManager/ProjectManager/Base.lproj/LaunchScreen.storyboard b/ProjectManager/ProjectManager/Helper/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from ProjectManager/ProjectManager/Base.lproj/LaunchScreen.storyboard rename to ProjectManager/ProjectManager/Helper/Base.lproj/LaunchScreen.storyboard diff --git a/ProjectManager/ProjectManager/ViewController.swift b/ProjectManager/ProjectManager/View/ViewController.swift similarity index 80% rename from ProjectManager/ProjectManager/ViewController.swift rename to ProjectManager/ProjectManager/View/ViewController.swift index 3f450cec2..36f476535 100644 --- a/ProjectManager/ProjectManager/ViewController.swift +++ b/ProjectManager/ProjectManager/View/ViewController.swift @@ -10,7 +10,7 @@ class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - // Do any additional setup after loading the view. + } From 1af713205939ac14145859a43e522ea0cdeef365 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 17:06:08 +0900 Subject: [PATCH 05/46] =?UTF-8?q?feat:=20AppDelegate=20=EC=97=90=20?= =?UTF-8?q?=EA=B0=80=EB=A1=9C=20=EC=84=A4=EC=A0=95=20=EB=A9=94=EC=84=9C?= =?UTF-8?q?=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/AppDelegate.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ProjectManager/ProjectManager/AppDelegate.swift b/ProjectManager/ProjectManager/AppDelegate.swift index c8773cc40..4a453f602 100644 --- a/ProjectManager/ProjectManager/AppDelegate.swift +++ b/ProjectManager/ProjectManager/AppDelegate.swift @@ -16,6 +16,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { FirebaseApp.configure() return true } + + func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask { + return .landscape + } // MARK: UISceneSession Lifecycle From 0052edcd9a2d1e1861bbfcb0cbc32990ba2ec53b Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 17:13:48 +0900 Subject: [PATCH 06/46] =?UTF-8?q?Refactor:=20rootViewController=20?= =?UTF-8?q?=EB=A5=BC=20navigationController=20=EB=A1=9C=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/SceneDelegate.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProjectManager/ProjectManager/SceneDelegate.swift b/ProjectManager/ProjectManager/SceneDelegate.swift index 5f969c499..bd4252cff 100644 --- a/ProjectManager/ProjectManager/SceneDelegate.swift +++ b/ProjectManager/ProjectManager/SceneDelegate.swift @@ -15,9 +15,9 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { guard let windowScene = (scene as? UIWindowScene) else { return } window = UIWindow(windowScene: windowScene) - let viewController = ViewController() + let navigationController = UINavigationController(rootViewController: ViewController()) - window?.rootViewController = viewController + window?.rootViewController = navigationController window?.makeKeyAndVisible() } From 4e4363c5fb684235983bbefa61f2a3d040c45992 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 17:39:32 +0900 Subject: [PATCH 07/46] =?UTF-8?q?feat:=20Schedule=20=ED=83=80=EC=9E=85=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager/Model/ ScheduleType.swift | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ProjectManager/ProjectManager/Model/ ScheduleType.swift diff --git a/ProjectManager/ProjectManager/Model/ ScheduleType.swift b/ProjectManager/ProjectManager/Model/ ScheduleType.swift new file mode 100644 index 000000000..0be8641a7 --- /dev/null +++ b/ProjectManager/ProjectManager/Model/ ScheduleType.swift @@ -0,0 +1,25 @@ +// +// ScheduleType.swift +// ProjectManager +// +// Created by Toy on 1/24/24. +// + +enum Schedule { + case todo + case doing + case done +} + +extension Schedule { + var discription: String { + switch self { + case .todo: + return "TODO" + case .doing: + return "DOING" + case .done: + return "DONE" + } + } +} From 63b6ead9023932750437b3170daf344a0b24af0e Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 18:01:23 +0900 Subject: [PATCH 08/46] =?UTF-8?q?feat:=20ViewController=20=EC=97=90=20fina?= =?UTF-8?q?l=20=ED=82=A4=EC=9B=8C=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/View/ViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/ViewController.swift b/ProjectManager/ProjectManager/View/ViewController.swift index 36f476535..ba8b2b287 100644 --- a/ProjectManager/ProjectManager/View/ViewController.swift +++ b/ProjectManager/ProjectManager/View/ViewController.swift @@ -6,7 +6,7 @@ import UIKit -class ViewController: UIViewController { +final class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() From fe7316028265d632d4987d972e238688f53ffe04 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 18:03:03 +0900 Subject: [PATCH 09/46] =?UTF-8?q?Feat:=20ListView=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager.xcodeproj/project.pbxproj | 8 +++ .../ProjectManager/View/ListTableView.swift | 57 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 ProjectManager/ProjectManager/View/ListTableView.swift diff --git a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj index bb1ea39f5..16f943c53 100644 --- a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj +++ b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj @@ -12,6 +12,8 @@ 3C353F0B2B60BFE00006509D /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353F0A2B60BFE00006509D /* RxCocoa */; }; 3C353F0F2B60BFE00006509D /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353F0E2B60BFE00006509D /* RxRelay */; }; 3C353F132B60BFE00006509D /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353F122B60BFE00006509D /* RxSwift */; }; + 3C8BE8E92B61018C006C66DB /* ListTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C8BE8E82B61018C006C66DB /* ListTableView.swift */; }; + 3C8BE8EB2B610380006C66DB /* ScheduleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */; }; 3C8D87FE2B5FB98000D7BD42 /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FD2B5FB98000D7BD42 /* Realm */; }; 3C8D88002B5FB98000D7BD42 /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FF2B5FB98000D7BD42 /* RealmSwift */; }; C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0525F51E1D0094C4CF /* AppDelegate.swift */; }; @@ -23,6 +25,8 @@ /* Begin PBXFileReference section */ 3C353EF82B60B9E70006509D /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + 3C8BE8E82B61018C006C66DB /* ListTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListTableView.swift; sourceTree = ""; }; + 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = " ScheduleType.swift"; sourceTree = ""; }; C7431F0225F51E1D0094C4CF /* ProjectManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProjectManager.app; sourceTree = BUILT_PRODUCTS_DIR; }; C7431F0525F51E1D0094C4CF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; C7431F0725F51E1D0094C4CF /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -52,6 +56,7 @@ 3C8BE8E42B60EDF6006C66DB /* Model */ = { isa = PBXGroup; children = ( + 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */, ); path = Model; sourceTree = ""; @@ -59,6 +64,7 @@ 3C8BE8E52B60EE02006C66DB /* View */ = { isa = PBXGroup; children = ( + 3C8BE8E82B61018C006C66DB /* ListTableView.swift */, C7431F0925F51E1D0094C4CF /* ViewController.swift */, ); path = View; @@ -195,7 +201,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 3C8BE8EB2B610380006C66DB /* ScheduleType.swift in Sources */, C7431F0A25F51E1D0094C4CF /* ViewController.swift in Sources */, + 3C8BE8E92B61018C006C66DB /* ListTableView.swift in Sources */, C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */, C7431F0825F51E1D0094C4CF /* SceneDelegate.swift in Sources */, ); diff --git a/ProjectManager/ProjectManager/View/ListTableView.swift b/ProjectManager/ProjectManager/View/ListTableView.swift new file mode 100644 index 000000000..233021393 --- /dev/null +++ b/ProjectManager/ProjectManager/View/ListTableView.swift @@ -0,0 +1,57 @@ +// +// ListTableView.swift +// ProjectManager +// +// Created by Toy on 1/24/24. +// + +import UIKit + +final class ListView: UINavigationController { + private let tableView = UITableView() + private let scheduleType: Schedule + + init(scheduleType: Schedule) { + self.scheduleType = scheduleType + super.init(nibName: nil, bundle: nil) + } + + required init?(coder aDecoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func viewDidLoad() { + setupTableView() + setupTableViewConstraint() + } + + private func setupTableView() { + tableView.delegate = self + tableView.dataSource = self + } + + private func setupTableViewConstraint() { + NSLayoutConstraint.activate([ + tableView.topAnchor.constraint(equalTo: view.topAnchor), + tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor), + tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor), + tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor) + ]) + } +} + +extension ListView: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 0 + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return UITableViewCell() + } + + +} + +extension ListView: UITableViewDelegate { + +} From 7f404a51beeab06e18049dc796893b173e54ffb9 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 21:02:25 +0900 Subject: [PATCH 10/46] =?UTF-8?q?Refactor:=20ListView=20=EB=A5=BC=20ListVi?= =?UTF-8?q?ewController=20=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...bleView.swift => ListViewController.swift} | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) rename ProjectManager/ProjectManager/View/{ListTableView.swift => ListViewController.swift} (58%) diff --git a/ProjectManager/ProjectManager/View/ListTableView.swift b/ProjectManager/ProjectManager/View/ListViewController.swift similarity index 58% rename from ProjectManager/ProjectManager/View/ListTableView.swift rename to ProjectManager/ProjectManager/View/ListViewController.swift index 233021393..4b3b42d44 100644 --- a/ProjectManager/ProjectManager/View/ListTableView.swift +++ b/ProjectManager/ProjectManager/View/ListViewController.swift @@ -1,5 +1,5 @@ // -// ListTableView.swift +// ListViewController.swift // ProjectManager // // Created by Toy on 1/24/24. @@ -7,7 +7,7 @@ import UIKit -final class ListView: UINavigationController { +final class ListViewController: UIViewController { private let tableView = UITableView() private let scheduleType: Schedule @@ -22,7 +22,6 @@ final class ListView: UINavigationController { override func viewDidLoad() { setupTableView() - setupTableViewConstraint() } private func setupTableView() { @@ -30,28 +29,19 @@ final class ListView: UINavigationController { tableView.dataSource = self } - private func setupTableViewConstraint() { - NSLayoutConstraint.activate([ - tableView.topAnchor.constraint(equalTo: view.topAnchor), - tableView.trailingAnchor.constraint(equalTo: view.trailingAnchor), - tableView.bottomAnchor.constraint(equalTo: view.bottomAnchor), - tableView.leadingAnchor.constraint(equalTo: view.leadingAnchor) - ]) - } } -extension ListView: UITableViewDataSource { +extension ListViewController: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return 0 + return 3 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { return UITableViewCell() } - } -extension ListView: UITableViewDelegate { +extension ListViewController: UITableViewDelegate { } From 2ba240dee45de4ae6a82b9b976918b70a947a1d1 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 21:03:09 +0900 Subject: [PATCH 11/46] =?UTF-8?q?Refactor:=20MainViewController=20?= =?UTF-8?q?=EB=A1=9C=20=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager.xcodeproj/project.pbxproj | 16 +++---- .../ProjectManager/SceneDelegate.swift | 2 +- .../View/MainViewController.swift | 47 +++++++++++++++++++ .../ProjectManager/View/ViewController.swift | 18 ------- 4 files changed, 56 insertions(+), 27 deletions(-) create mode 100644 ProjectManager/ProjectManager/View/MainViewController.swift delete mode 100644 ProjectManager/ProjectManager/View/ViewController.swift diff --git a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj index 16f943c53..7b0af6d9c 100644 --- a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj +++ b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj @@ -12,25 +12,25 @@ 3C353F0B2B60BFE00006509D /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353F0A2B60BFE00006509D /* RxCocoa */; }; 3C353F0F2B60BFE00006509D /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353F0E2B60BFE00006509D /* RxRelay */; }; 3C353F132B60BFE00006509D /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353F122B60BFE00006509D /* RxSwift */; }; - 3C8BE8E92B61018C006C66DB /* ListTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C8BE8E82B61018C006C66DB /* ListTableView.swift */; }; + 3C8BE8E92B61018C006C66DB /* ListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C8BE8E82B61018C006C66DB /* ListViewController.swift */; }; 3C8BE8EB2B610380006C66DB /* ScheduleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */; }; 3C8D87FE2B5FB98000D7BD42 /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FD2B5FB98000D7BD42 /* Realm */; }; 3C8D88002B5FB98000D7BD42 /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FF2B5FB98000D7BD42 /* RealmSwift */; }; C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0525F51E1D0094C4CF /* AppDelegate.swift */; }; C7431F0825F51E1D0094C4CF /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0725F51E1D0094C4CF /* SceneDelegate.swift */; }; - C7431F0A25F51E1D0094C4CF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0925F51E1D0094C4CF /* ViewController.swift */; }; + C7431F0A25F51E1D0094C4CF /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0925F51E1D0094C4CF /* MainViewController.swift */; }; C7431F0F25F51E1E0094C4CF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C7431F0E25F51E1E0094C4CF /* Assets.xcassets */; }; C7431F1225F51E1E0094C4CF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C7431F1025F51E1E0094C4CF /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 3C353EF82B60B9E70006509D /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; - 3C8BE8E82B61018C006C66DB /* ListTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListTableView.swift; sourceTree = ""; }; + 3C8BE8E82B61018C006C66DB /* ListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListViewController.swift; sourceTree = ""; }; 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = " ScheduleType.swift"; sourceTree = ""; }; C7431F0225F51E1D0094C4CF /* ProjectManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProjectManager.app; sourceTree = BUILT_PRODUCTS_DIR; }; C7431F0525F51E1D0094C4CF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; C7431F0725F51E1D0094C4CF /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; - C7431F0925F51E1D0094C4CF /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + C7431F0925F51E1D0094C4CF /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; C7431F0E25F51E1E0094C4CF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; C7431F1125F51E1E0094C4CF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; C7431F1325F51E1E0094C4CF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -64,8 +64,8 @@ 3C8BE8E52B60EE02006C66DB /* View */ = { isa = PBXGroup; children = ( - 3C8BE8E82B61018C006C66DB /* ListTableView.swift */, - C7431F0925F51E1D0094C4CF /* ViewController.swift */, + 3C8BE8E82B61018C006C66DB /* ListViewController.swift */, + C7431F0925F51E1D0094C4CF /* MainViewController.swift */, ); path = View; sourceTree = ""; @@ -202,8 +202,8 @@ buildActionMask = 2147483647; files = ( 3C8BE8EB2B610380006C66DB /* ScheduleType.swift in Sources */, - C7431F0A25F51E1D0094C4CF /* ViewController.swift in Sources */, - 3C8BE8E92B61018C006C66DB /* ListTableView.swift in Sources */, + C7431F0A25F51E1D0094C4CF /* MainViewController.swift in Sources */, + 3C8BE8E92B61018C006C66DB /* ListViewController.swift in Sources */, C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */, C7431F0825F51E1D0094C4CF /* SceneDelegate.swift in Sources */, ); diff --git a/ProjectManager/ProjectManager/SceneDelegate.swift b/ProjectManager/ProjectManager/SceneDelegate.swift index bd4252cff..7cd33134e 100644 --- a/ProjectManager/ProjectManager/SceneDelegate.swift +++ b/ProjectManager/ProjectManager/SceneDelegate.swift @@ -15,7 +15,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { guard let windowScene = (scene as? UIWindowScene) else { return } window = UIWindow(windowScene: windowScene) - let navigationController = UINavigationController(rootViewController: ViewController()) + let navigationController = UINavigationController(rootViewController: MainViewController()) window?.rootViewController = navigationController window?.makeKeyAndVisible() diff --git a/ProjectManager/ProjectManager/View/MainViewController.swift b/ProjectManager/ProjectManager/View/MainViewController.swift new file mode 100644 index 000000000..c60de132f --- /dev/null +++ b/ProjectManager/ProjectManager/View/MainViewController.swift @@ -0,0 +1,47 @@ +// +// ProjectManager - ViewController.swift +// Created by yagom. +// Copyright © yagom. All rights reserved. +// + +import UIKit + +final class MainViewController: UIViewController { + private let todoTableView = ListViewController(scheduleType: .todo) + private let doingTableView = ListViewController(scheduleType: .doing) + private let doneTableView = ListViewController(scheduleType: .done) + + private let stackView = { + let stackView = UIStackView() + stackView.axis = .horizontal + stackView.distribution = .fillEqually + stackView.alignment = .fill + stackView.spacing = 10 + stackView.backgroundColor = .lightGray + stackView.translatesAutoresizingMaskIntoConstraints = false + return stackView + }() + + override func viewDidLoad() { + super.viewDidLoad() + setupStackView() + setupStackViewConstraint() + } + + private func setupStackView() { + stackView.addArrangedSubview(todoTableView.view) + stackView.addArrangedSubview(doingTableView.view) + stackView.addArrangedSubview(doneTableView.view) + view.addSubview(stackView) + } + + private func setupStackViewConstraint() { + NSLayoutConstraint.activate([ + stackView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor), + stackView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor), + stackView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor), + stackView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor) + ]) + } + +} diff --git a/ProjectManager/ProjectManager/View/ViewController.swift b/ProjectManager/ProjectManager/View/ViewController.swift deleted file mode 100644 index ba8b2b287..000000000 --- a/ProjectManager/ProjectManager/View/ViewController.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// ProjectManager - ViewController.swift -// Created by yagom. -// Copyright © yagom. All rights reserved. -// - -import UIKit - -final class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - - } - - -} - From 9ca13465cc3d21654d82b414072100055b491a5a Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 21:20:17 +0900 Subject: [PATCH 12/46] =?UTF-8?q?Comment:=20=EC=BD=94=EB=93=9C=20=EC=8A=A4?= =?UTF-8?q?=EB=8B=88=ED=8E=AB=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/View/ListViewController.swift | 5 +++++ ProjectManager/ProjectManager/View/MainViewController.swift | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/ListViewController.swift b/ProjectManager/ProjectManager/View/ListViewController.swift index 4b3b42d44..d312c7fef 100644 --- a/ProjectManager/ProjectManager/View/ListViewController.swift +++ b/ProjectManager/ProjectManager/View/ListViewController.swift @@ -8,6 +8,7 @@ import UIKit final class ListViewController: UIViewController { + // MARK: - Property private let tableView = UITableView() private let scheduleType: Schedule @@ -20,10 +21,12 @@ final class ListViewController: UIViewController { fatalError("init(coder:) has not been implemented") } + // MARK: - Lifecycle override func viewDidLoad() { setupTableView() } + // MARK: - Helper private func setupTableView() { tableView.delegate = self tableView.dataSource = self @@ -31,6 +34,7 @@ final class ListViewController: UIViewController { } +// MARK: - UITableViewDataSource Method extension ListViewController: UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 3 @@ -42,6 +46,7 @@ extension ListViewController: UITableViewDataSource { } +// MARK: - UITableViewDelegate Method extension ListViewController: UITableViewDelegate { } diff --git a/ProjectManager/ProjectManager/View/MainViewController.swift b/ProjectManager/ProjectManager/View/MainViewController.swift index c60de132f..f2b3cf3ec 100644 --- a/ProjectManager/ProjectManager/View/MainViewController.swift +++ b/ProjectManager/ProjectManager/View/MainViewController.swift @@ -7,6 +7,7 @@ import UIKit final class MainViewController: UIViewController { + // MARK: - Property private let todoTableView = ListViewController(scheduleType: .todo) private let doingTableView = ListViewController(scheduleType: .doing) private let doneTableView = ListViewController(scheduleType: .done) @@ -21,13 +22,15 @@ final class MainViewController: UIViewController { stackView.translatesAutoresizingMaskIntoConstraints = false return stackView }() - + + // MARK: - Lifecycle override func viewDidLoad() { super.viewDidLoad() setupStackView() setupStackViewConstraint() } + // MARK: - Helper private func setupStackView() { stackView.addArrangedSubview(todoTableView.view) stackView.addArrangedSubview(doingTableView.view) From cbb053bd362a7d6e3ae1466c063f5660f4847969 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 21:26:20 +0900 Subject: [PATCH 13/46] =?UTF-8?q?Refactor:=20ListViewController=20?= =?UTF-8?q?=EC=83=81=EC=86=8D=EC=9D=84=20UINavigationController=20?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/View/ListViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/ListViewController.swift b/ProjectManager/ProjectManager/View/ListViewController.swift index d312c7fef..e747ca3f9 100644 --- a/ProjectManager/ProjectManager/View/ListViewController.swift +++ b/ProjectManager/ProjectManager/View/ListViewController.swift @@ -7,7 +7,7 @@ import UIKit -final class ListViewController: UIViewController { +final class ListViewController: UINavigationController { // MARK: - Property private let tableView = UITableView() private let scheduleType: Schedule From 3569a00b4897de5f2c136f049dafc77ccbe0848e Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 22:57:30 +0900 Subject: [PATCH 14/46] =?UTF-8?q?Revert=20"Refactor:=20ListViewController?= =?UTF-8?q?=20=EC=83=81=EC=86=8D=EC=9D=84=20UINavigationController=20?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit cbb053bd362a7d6e3ae1466c063f5660f4847969. --- ProjectManager/ProjectManager/View/ListViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/ListViewController.swift b/ProjectManager/ProjectManager/View/ListViewController.swift index e747ca3f9..d312c7fef 100644 --- a/ProjectManager/ProjectManager/View/ListViewController.swift +++ b/ProjectManager/ProjectManager/View/ListViewController.swift @@ -7,7 +7,7 @@ import UIKit -final class ListViewController: UINavigationController { +final class ListViewController: UIViewController { // MARK: - Property private let tableView = UITableView() private let scheduleType: Schedule From 14542450ba3d6f8bd26a1317954909ccc944b883 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 22:59:43 +0900 Subject: [PATCH 15/46] =?UTF-8?q?Feat:=20tableView=20=EC=98=A4=ED=86=A0?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/ListViewController.swift | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/ListViewController.swift b/ProjectManager/ProjectManager/View/ListViewController.swift index d312c7fef..144809c9e 100644 --- a/ProjectManager/ProjectManager/View/ListViewController.swift +++ b/ProjectManager/ProjectManager/View/ListViewController.swift @@ -9,7 +9,13 @@ import UIKit final class ListViewController: UIViewController { // MARK: - Property - private let tableView = UITableView() + private let tableView = { + let tableView = UITableView() + tableView.backgroundColor = .white + tableView.translatesAutoresizingMaskIntoConstraints = false + return tableView + }() + private let scheduleType: Schedule init(scheduleType: Schedule) { @@ -24,14 +30,24 @@ final class ListViewController: UIViewController { // MARK: - Lifecycle override func viewDidLoad() { setupTableView() + setupTableViewConstraint() } // MARK: - Helper private func setupTableView() { tableView.delegate = self tableView.dataSource = self + view.addSubview(tableView) } + private func setupTableViewConstraint() { + NSLayoutConstraint.activate([ + tableView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor), + tableView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor), + tableView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor), + tableView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor) + ]) + } } // MARK: - UITableViewDataSource Method From 4bbe4a20e5332f9abcb4b7df5c49314810a52c28 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 23:04:28 +0900 Subject: [PATCH 16/46] =?UTF-8?q?Feat:=20HeaderView=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager.xcodeproj/project.pbxproj | 6 +++++- ProjectManager/ProjectManager/View/HeaderView.swift | 12 ++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 ProjectManager/ProjectManager/View/HeaderView.swift diff --git a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj index 7b0af6d9c..b1d311649 100644 --- a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj +++ b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ 3C353F0B2B60BFE00006509D /* RxCocoa in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353F0A2B60BFE00006509D /* RxCocoa */; }; 3C353F0F2B60BFE00006509D /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353F0E2B60BFE00006509D /* RxRelay */; }; 3C353F132B60BFE00006509D /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 3C353F122B60BFE00006509D /* RxSwift */; }; + 3C49030E2B614FFF004D16B4 /* HeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C49030D2B614FFF004D16B4 /* HeaderView.swift */; }; 3C8BE8E92B61018C006C66DB /* ListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C8BE8E82B61018C006C66DB /* ListViewController.swift */; }; 3C8BE8EB2B610380006C66DB /* ScheduleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */; }; 3C8D87FE2B5FB98000D7BD42 /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FD2B5FB98000D7BD42 /* Realm */; }; @@ -25,6 +26,7 @@ /* Begin PBXFileReference section */ 3C353EF82B60B9E70006509D /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; + 3C49030D2B614FFF004D16B4 /* HeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderView.swift; sourceTree = ""; }; 3C8BE8E82B61018C006C66DB /* ListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListViewController.swift; sourceTree = ""; }; 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = " ScheduleType.swift"; sourceTree = ""; }; C7431F0225F51E1D0094C4CF /* ProjectManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProjectManager.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -64,8 +66,9 @@ 3C8BE8E52B60EE02006C66DB /* View */ = { isa = PBXGroup; children = ( - 3C8BE8E82B61018C006C66DB /* ListViewController.swift */, C7431F0925F51E1D0094C4CF /* MainViewController.swift */, + 3C8BE8E82B61018C006C66DB /* ListViewController.swift */, + 3C49030D2B614FFF004D16B4 /* HeaderView.swift */, ); path = View; sourceTree = ""; @@ -202,6 +205,7 @@ buildActionMask = 2147483647; files = ( 3C8BE8EB2B610380006C66DB /* ScheduleType.swift in Sources */, + 3C49030E2B614FFF004D16B4 /* HeaderView.swift in Sources */, C7431F0A25F51E1D0094C4CF /* MainViewController.swift in Sources */, 3C8BE8E92B61018C006C66DB /* ListViewController.swift in Sources */, C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */, diff --git a/ProjectManager/ProjectManager/View/HeaderView.swift b/ProjectManager/ProjectManager/View/HeaderView.swift new file mode 100644 index 000000000..073b1a18c --- /dev/null +++ b/ProjectManager/ProjectManager/View/HeaderView.swift @@ -0,0 +1,12 @@ +// +// HeaderView.swift +// ProjectManager +// +// Created by Toy on 1/24/24. +// + +import UIKit + +final class HeaderView: UIView { + +} From 79bd93e55af1906e7190082475585cccc50aa200 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 23:43:45 +0900 Subject: [PATCH 17/46] =?UTF-8?q?Feat:=20UILabel=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=ED=8D=BC=ED=8B=B0=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=EC=9E=90=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager.xcodeproj/project.pbxproj | 8 ++++++++ .../ProjectManager/View/HeaderView.swift | 15 +++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj index b1d311649..6786f331d 100644 --- a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj +++ b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj @@ -55,6 +55,13 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 3C49030F2B615113004D16B4 /* Application */ = { + isa = PBXGroup; + children = ( + ); + path = Application; + sourceTree = ""; + }; 3C8BE8E42B60EDF6006C66DB /* Model */ = { isa = PBXGroup; children = ( @@ -108,6 +115,7 @@ C7431F0425F51E1D0094C4CF /* ProjectManager */ = { isa = PBXGroup; children = ( + 3C49030F2B615113004D16B4 /* Application */, C7431F0525F51E1D0094C4CF /* AppDelegate.swift */, C7431F0725F51E1D0094C4CF /* SceneDelegate.swift */, 3C8BE8E42B60EDF6006C66DB /* Model */, diff --git a/ProjectManager/ProjectManager/View/HeaderView.swift b/ProjectManager/ProjectManager/View/HeaderView.swift index 073b1a18c..99bcd1190 100644 --- a/ProjectManager/ProjectManager/View/HeaderView.swift +++ b/ProjectManager/ProjectManager/View/HeaderView.swift @@ -8,5 +8,20 @@ import UIKit final class HeaderView: UIView { + // MARK: - Property + private let titleLabel = { + let label = UILabel() + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + + init(frame: CGRect, schedule: Schedule) { + self.titleLabel.text = schedule.discription + super.init(frame: frame) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } } From e6afdb866beb33d81a2f2d6783798a8d1e53c677 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 23:47:56 +0900 Subject: [PATCH 18/46] =?UTF-8?q?Feat:=20NameSpace=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager.xcodeproj/project.pbxproj | 12 ++++++++++++ .../ProjectManager/Utility/NameSpace.swift | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 ProjectManager/ProjectManager/Utility/NameSpace.swift diff --git a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj index 6786f331d..4b30850c7 100644 --- a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj +++ b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 3C8BE8EB2B610380006C66DB /* ScheduleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */; }; 3C8D87FE2B5FB98000D7BD42 /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FD2B5FB98000D7BD42 /* Realm */; }; 3C8D88002B5FB98000D7BD42 /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FF2B5FB98000D7BD42 /* RealmSwift */; }; + 3CECAD4D2B615A4A00D78584 /* NameSpace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CECAD4C2B615A4A00D78584 /* NameSpace.swift */; }; C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0525F51E1D0094C4CF /* AppDelegate.swift */; }; C7431F0825F51E1D0094C4CF /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0725F51E1D0094C4CF /* SceneDelegate.swift */; }; C7431F0A25F51E1D0094C4CF /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0925F51E1D0094C4CF /* MainViewController.swift */; }; @@ -29,6 +30,7 @@ 3C49030D2B614FFF004D16B4 /* HeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderView.swift; sourceTree = ""; }; 3C8BE8E82B61018C006C66DB /* ListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListViewController.swift; sourceTree = ""; }; 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = " ScheduleType.swift"; sourceTree = ""; }; + 3CECAD4C2B615A4A00D78584 /* NameSpace.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NameSpace.swift; sourceTree = ""; }; C7431F0225F51E1D0094C4CF /* ProjectManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProjectManager.app; sourceTree = BUILT_PRODUCTS_DIR; }; C7431F0525F51E1D0094C4CF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; C7431F0725F51E1D0094C4CF /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -96,6 +98,14 @@ path = Helper; sourceTree = ""; }; + 3CECAD4B2B615A2C00D78584 /* Utility */ = { + isa = PBXGroup; + children = ( + 3CECAD4C2B615A4A00D78584 /* NameSpace.swift */, + ); + path = Utility; + sourceTree = ""; + }; C7431EF925F51E1D0094C4CF = { isa = PBXGroup; children = ( @@ -121,6 +131,7 @@ 3C8BE8E42B60EDF6006C66DB /* Model */, 3C8BE8E52B60EE02006C66DB /* View */, 3C8BE8E62B60EE0B006C66DB /* ViewModel */, + 3CECAD4B2B615A2C00D78584 /* Utility */, 3C8BE8E72B60EFDB006C66DB /* Helper */, C7431F1325F51E1E0094C4CF /* Info.plist */, 3C353EF82B60B9E70006509D /* GoogleService-Info.plist */, @@ -216,6 +227,7 @@ 3C49030E2B614FFF004D16B4 /* HeaderView.swift in Sources */, C7431F0A25F51E1D0094C4CF /* MainViewController.swift in Sources */, 3C8BE8E92B61018C006C66DB /* ListViewController.swift in Sources */, + 3CECAD4D2B615A4A00D78584 /* NameSpace.swift in Sources */, C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */, C7431F0825F51E1D0094C4CF /* SceneDelegate.swift in Sources */, ); diff --git a/ProjectManager/ProjectManager/Utility/NameSpace.swift b/ProjectManager/ProjectManager/Utility/NameSpace.swift new file mode 100644 index 000000000..3403b5b9b --- /dev/null +++ b/ProjectManager/ProjectManager/Utility/NameSpace.swift @@ -0,0 +1,12 @@ +// +// NameSpace.swift +// ProjectManager +// +// Created by Toy on 1/24/24. +// + +enum NameSpace { + static let todo = "TODO" + static let doing = "DOING" + static let done = "DONE" +} From cbde8bac287813ab81dd0903630eef8b0b109ee4 Mon Sep 17 00:00:00 2001 From: Nova Date: Wed, 24 Jan 2024 23:49:10 +0900 Subject: [PATCH 19/46] =?UTF-8?q?Refactor:=20NameSpace=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/Model/ ScheduleType.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ProjectManager/ProjectManager/Model/ ScheduleType.swift b/ProjectManager/ProjectManager/Model/ ScheduleType.swift index 0be8641a7..07acaa141 100644 --- a/ProjectManager/ProjectManager/Model/ ScheduleType.swift +++ b/ProjectManager/ProjectManager/Model/ ScheduleType.swift @@ -15,11 +15,11 @@ extension Schedule { var discription: String { switch self { case .todo: - return "TODO" + return NameSpace.todo case .doing: - return "DOING" + return NameSpace.doing case .done: - return "DONE" + return NameSpace.done } } } From 45f69b9b84c594cb60616b7e2f6e29a2d608959e Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 16:42:23 +0900 Subject: [PATCH 20/46] =?UTF-8?q?Feat:=20HeaderView=20=EC=98=A4=ED=86=A0?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager/View/HeaderView.swift | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/HeaderView.swift b/ProjectManager/ProjectManager/View/HeaderView.swift index 99bcd1190..f17fec59c 100644 --- a/ProjectManager/ProjectManager/View/HeaderView.swift +++ b/ProjectManager/ProjectManager/View/HeaderView.swift @@ -11,17 +11,42 @@ final class HeaderView: UIView { // MARK: - Property private let titleLabel = { let label = UILabel() - label.translatesAutoresizingMaskIntoConstraints = false + label.font = UIFont.systemFont(ofSize: 30) return label }() + private let stackView = { + let stackView = UIStackView() + stackView.axis = .horizontal + stackView.distribution = .fill + stackView.alignment = .fill + stackView.translatesAutoresizingMaskIntoConstraints = false + return stackView + }() + init(frame: CGRect, schedule: Schedule) { self.titleLabel.text = schedule.discription super.init(frame: frame) + setupStackView() + setupStackViewConstraint() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } + // MARK: - Helper + private func setupStackView() { + stackView.addArrangedSubview(titleLabel) + self.addSubview(stackView) + } + + private func setupStackViewConstraint() { + NSLayoutConstraint.activate([ + stackView.topAnchor.constraint(equalTo: self.topAnchor, constant: 10), + stackView.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -10), + stackView.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: 15) + ]) + } + } From d96f58f85d6f5a90494283a0bda09e0c2b1e666b Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 16:46:11 +0900 Subject: [PATCH 21/46] =?UTF-8?q?Design:=20stackView=20backgroundColor=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/View/MainViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/MainViewController.swift b/ProjectManager/ProjectManager/View/MainViewController.swift index f2b3cf3ec..300d248db 100644 --- a/ProjectManager/ProjectManager/View/MainViewController.swift +++ b/ProjectManager/ProjectManager/View/MainViewController.swift @@ -18,7 +18,7 @@ final class MainViewController: UIViewController { stackView.distribution = .fillEqually stackView.alignment = .fill stackView.spacing = 10 - stackView.backgroundColor = .lightGray + stackView.backgroundColor = .systemGray4 stackView.translatesAutoresizingMaskIntoConstraints = false return stackView }() From 73b184a48572d70497fc65a4392bb740e43b37bb Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 16:47:08 +0900 Subject: [PATCH 22/46] =?UTF-8?q?Feat:=20stackView=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/ListViewController.swift | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/ProjectManager/ProjectManager/View/ListViewController.swift b/ProjectManager/ProjectManager/View/ListViewController.swift index 144809c9e..7a414eae1 100644 --- a/ProjectManager/ProjectManager/View/ListViewController.swift +++ b/ProjectManager/ProjectManager/View/ListViewController.swift @@ -11,11 +11,26 @@ final class ListViewController: UIViewController { // MARK: - Property private let tableView = { let tableView = UITableView() - tableView.backgroundColor = .white - tableView.translatesAutoresizingMaskIntoConstraints = false + tableView.backgroundColor = .systemGray6 return tableView }() + private lazy var headerView = { + let headerView = HeaderView(frame: .zero, schedule: scheduleType) + headerView.backgroundColor = .systemGray6 + return headerView + }() + + private let stackView = { + let stackView = UIStackView() + stackView.axis = .vertical + stackView.distribution = .fill + stackView.alignment = .fill + stackView.spacing = 0 + stackView.translatesAutoresizingMaskIntoConstraints = false + return stackView + }() + private let scheduleType: Schedule init(scheduleType: Schedule) { From 4bd2a4bf7293dd9a3c0e77e6b49694131a9a8686 Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 16:47:36 +0900 Subject: [PATCH 23/46] =?UTF-8?q?Refactor:=20stackView=20=EC=98=A4?= =?UTF-8?q?=ED=86=A0=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/ListViewController.swift | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/ProjectManager/ProjectManager/View/ListViewController.swift b/ProjectManager/ProjectManager/View/ListViewController.swift index 7a414eae1..04caa1138 100644 --- a/ProjectManager/ProjectManager/View/ListViewController.swift +++ b/ProjectManager/ProjectManager/View/ListViewController.swift @@ -45,24 +45,31 @@ final class ListViewController: UIViewController { // MARK: - Lifecycle override func viewDidLoad() { setupTableView() - setupTableViewConstraint() + setupStackView() + setupStackViewConstraint() } // MARK: - Helper private func setupTableView() { tableView.delegate = self tableView.dataSource = self - view.addSubview(tableView) } - private func setupTableViewConstraint() { + private func setupStackView() { + stackView.addArrangedSubview(headerView) + stackView.addArrangedSubview(tableView) + view.addSubview(stackView) + } + + private func setupStackViewConstraint() { NSLayoutConstraint.activate([ - tableView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor), - tableView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor), - tableView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor), - tableView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor) + stackView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor), + stackView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor), + stackView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor), + stackView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor) ]) } + } // MARK: - UITableViewDataSource Method From 7f8b5bce3ee62e201dbdbfa11ceea653f50ddb34 Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 17:20:03 +0900 Subject: [PATCH 24/46] =?UTF-8?q?Feat:=20NameSpace=20=EC=97=90=20title=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/Utility/NameSpace.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/ProjectManager/ProjectManager/Utility/NameSpace.swift b/ProjectManager/ProjectManager/Utility/NameSpace.swift index 3403b5b9b..10b00f02f 100644 --- a/ProjectManager/ProjectManager/Utility/NameSpace.swift +++ b/ProjectManager/ProjectManager/Utility/NameSpace.swift @@ -9,4 +9,5 @@ enum NameSpace { static let todo = "TODO" static let doing = "DOING" static let done = "DONE" + static let title = "Project Manager" } From 2691cb162b1dc48d4a205770890417354af6478b Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 17:20:20 +0900 Subject: [PATCH 25/46] =?UTF-8?q?Feat:=20NavigationBar=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager/View/MainViewController.swift | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/MainViewController.swift b/ProjectManager/ProjectManager/View/MainViewController.swift index 300d248db..9034f9a9b 100644 --- a/ProjectManager/ProjectManager/View/MainViewController.swift +++ b/ProjectManager/ProjectManager/View/MainViewController.swift @@ -28,9 +28,21 @@ final class MainViewController: UIViewController { super.viewDidLoad() setupStackView() setupStackViewConstraint() + setupNavigationBar() } - + // MARK: - Helper + private func setupNavigationBar() { + let appearnce = UINavigationBarAppearance() + appearnce.configureWithTransparentBackground() + appearnce.backgroundColor = UIColor(red: 0xE5 / 255.0, green: 0xE5 / 255.0, blue: 0xE5 / 255.0, alpha: 1.0) + + navigationItem.title = NameSpace.title + navigationItem.compactAppearance = appearnce + navigationItem.standardAppearance = appearnce + navigationItem.scrollEdgeAppearance = appearnce + } + private func setupStackView() { stackView.addArrangedSubview(todoTableView.view) stackView.addArrangedSubview(doingTableView.view) From b5729e680a042a7764244c8e151aeef0eb65a42c Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 17:57:46 +0900 Subject: [PATCH 26/46] =?UTF-8?q?Feat:=20Extension=20UIView=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Top border 에만 lineWidth 를 주기 위해 구현 --- .../ProjectManager/Utility/Extension.swift | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 ProjectManager/ProjectManager/Utility/Extension.swift diff --git a/ProjectManager/ProjectManager/Utility/Extension.swift b/ProjectManager/ProjectManager/Utility/Extension.swift new file mode 100644 index 000000000..0bbda7a16 --- /dev/null +++ b/ProjectManager/ProjectManager/Utility/Extension.swift @@ -0,0 +1,30 @@ +// +// Extension.swift +// ProjectManager +// +// Created by Toy on 1/25/24. +// + +import UIKit + +extension UIView { + func addTopBorder(at position: UIRectEdge, color: UIColor, thickness: CGFloat) { + let border = CALayer() + border.backgroundColor = color.cgColor + + switch position { + case .top: + border.frame = CGRect(x: 0, y: 0, width: frame.size.width, height: thickness) + case .bottom: + border.frame = CGRect(x: 0, y: frame.size.height - thickness, width: frame.size.width, height: thickness) + case .left: + border.frame = CGRect(x: 0, y: 0, width: thickness, height: frame.size.height) + case .right: + border.frame = CGRect(x: frame.size.width - thickness, y: 0, width: thickness, height: frame.size.height) + default: + break + } + + layer.addSublayer(border) + } +} From 0ccb92a300c81ddc79af3c015ba6f3cb80414219 Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 17:58:17 +0900 Subject: [PATCH 27/46] =?UTF-8?q?Feat:=20NameSpace=20=EC=97=90=20=EC=83=89?= =?UTF-8?q?=EC=83=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/Utility/NameSpace.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ProjectManager/ProjectManager/Utility/NameSpace.swift b/ProjectManager/ProjectManager/Utility/NameSpace.swift index 10b00f02f..7a2f09b89 100644 --- a/ProjectManager/ProjectManager/Utility/NameSpace.swift +++ b/ProjectManager/ProjectManager/Utility/NameSpace.swift @@ -5,9 +5,12 @@ // Created by Toy on 1/24/24. // +import UIKit + enum NameSpace { static let todo = "TODO" static let doing = "DOING" static let done = "DONE" static let title = "Project Manager" + static let headerAndFooterColor = UIColor(red: 0xE5 / 255.0, green: 0xE5 / 255.0, blue: 0xE5 / 255.0, alpha: 1.0) } From b54a63af1d919b4a2ec46409def1b16654d7c99c Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 17:58:42 +0900 Subject: [PATCH 28/46] =?UTF-8?q?Refactor:=20=ED=94=84=EB=A1=9C=ED=8D=BC?= =?UTF-8?q?=ED=8B=B0=20=EC=9C=84=EC=B9=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/View/ListViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ProjectManager/ProjectManager/View/ListViewController.swift b/ProjectManager/ProjectManager/View/ListViewController.swift index 04caa1138..c9b01bf6e 100644 --- a/ProjectManager/ProjectManager/View/ListViewController.swift +++ b/ProjectManager/ProjectManager/View/ListViewController.swift @@ -9,6 +9,8 @@ import UIKit final class ListViewController: UIViewController { // MARK: - Property + private let scheduleType: Schedule + private let tableView = { let tableView = UITableView() tableView.backgroundColor = .systemGray6 @@ -31,8 +33,6 @@ final class ListViewController: UIViewController { return stackView }() - private let scheduleType: Schedule - init(scheduleType: Schedule) { self.scheduleType = scheduleType super.init(nibName: nil, bundle: nil) From 2ffb7578c8fde89ee232c9baacb887061bcb9176 Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 17:59:55 +0900 Subject: [PATCH 29/46] =?UTF-8?q?Feat:=20footerView=20=EC=99=80=20stackVie?= =?UTF-8?q?w=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/MainViewController.swift | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/MainViewController.swift b/ProjectManager/ProjectManager/View/MainViewController.swift index 9034f9a9b..6bad7c217 100644 --- a/ProjectManager/ProjectManager/View/MainViewController.swift +++ b/ProjectManager/ProjectManager/View/MainViewController.swift @@ -12,7 +12,14 @@ final class MainViewController: UIViewController { private let doingTableView = ListViewController(scheduleType: .doing) private let doneTableView = ListViewController(scheduleType: .done) - private let stackView = { + private let footerView = { + let view = UIView() + view.backgroundColor = NameSpace.headerAndFooterColor + view.heightAnchor.constraint(equalToConstant: 60).isActive = true + return view + }() + + private let tabelStackView = { let stackView = UIStackView() stackView.axis = .horizontal stackView.distribution = .fillEqually @@ -23,6 +30,16 @@ final class MainViewController: UIViewController { return stackView }() + private let stackView = { + let stackView = UIStackView() + stackView.axis = .vertical + stackView.distribution = .fill + stackView.alignment = .fill + stackView.spacing = 0 + stackView.translatesAutoresizingMaskIntoConstraints = false + return stackView + }() + // MARK: - Lifecycle override func viewDidLoad() { super.viewDidLoad() From b386579e42a16abc68a7ac197148bccff9017dd1 Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 18:00:40 +0900 Subject: [PATCH 30/46] =?UTF-8?q?Refactor:=20NameSpace=20=EC=A0=81?= =?UTF-8?q?=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/View/MainViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/MainViewController.swift b/ProjectManager/ProjectManager/View/MainViewController.swift index 6bad7c217..1f7b388d5 100644 --- a/ProjectManager/ProjectManager/View/MainViewController.swift +++ b/ProjectManager/ProjectManager/View/MainViewController.swift @@ -52,7 +52,7 @@ final class MainViewController: UIViewController { private func setupNavigationBar() { let appearnce = UINavigationBarAppearance() appearnce.configureWithTransparentBackground() - appearnce.backgroundColor = UIColor(red: 0xE5 / 255.0, green: 0xE5 / 255.0, blue: 0xE5 / 255.0, alpha: 1.0) + appearnce.backgroundColor = NameSpace.headerAndFooterColor navigationItem.title = NameSpace.title navigationItem.compactAppearance = appearnce From e8d29866edec5d9aa2cd8317fff1f9cd1765c02e Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 18:01:24 +0900 Subject: [PATCH 31/46] =?UTF-8?q?Feat:=20stackView=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager/View/MainViewController.swift | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/ProjectManager/ProjectManager/View/MainViewController.swift b/ProjectManager/ProjectManager/View/MainViewController.swift index 1f7b388d5..ac25f6e26 100644 --- a/ProjectManager/ProjectManager/View/MainViewController.swift +++ b/ProjectManager/ProjectManager/View/MainViewController.swift @@ -43,9 +43,12 @@ final class MainViewController: UIViewController { // MARK: - Lifecycle override func viewDidLoad() { super.viewDidLoad() + setupNavigationBar() + setupTableStackView() setupStackView() setupStackViewConstraint() - setupNavigationBar() + + } } // MARK: - Helper @@ -60,10 +63,15 @@ final class MainViewController: UIViewController { navigationItem.scrollEdgeAppearance = appearnce } + private func setupTableStackView() { + tabelStackView.addArrangedSubview(todoTableView.view) + tabelStackView.addArrangedSubview(doingTableView.view) + tabelStackView.addArrangedSubview(doneTableView.view) + } + private func setupStackView() { - stackView.addArrangedSubview(todoTableView.view) - stackView.addArrangedSubview(doingTableView.view) - stackView.addArrangedSubview(doneTableView.view) + stackView.addArrangedSubview(tabelStackView) + stackView.addArrangedSubview(footerView) view.addSubview(stackView) } From 82f3d9cc59ea7f86f1f5d0b0d2ee7c3136b31251 Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 18:02:13 +0900 Subject: [PATCH 32/46] =?UTF-8?q?Feat:=20addTopBorder=20=EB=A9=94=EC=84=9C?= =?UTF-8?q?=EB=93=9C=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager.xcodeproj/project.pbxproj | 4 ++++ ProjectManager/ProjectManager/View/MainViewController.swift | 3 +++ 2 files changed, 7 insertions(+) diff --git a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj index 4b30850c7..9d5c3edd3 100644 --- a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj +++ b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 3C8BE8EB2B610380006C66DB /* ScheduleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */; }; 3C8D87FE2B5FB98000D7BD42 /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FD2B5FB98000D7BD42 /* Realm */; }; 3C8D88002B5FB98000D7BD42 /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FF2B5FB98000D7BD42 /* RealmSwift */; }; + 3CEBC8492B6256BE006EF065 /* Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CEBC8482B6256BD006EF065 /* Extension.swift */; }; 3CECAD4D2B615A4A00D78584 /* NameSpace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CECAD4C2B615A4A00D78584 /* NameSpace.swift */; }; C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0525F51E1D0094C4CF /* AppDelegate.swift */; }; C7431F0825F51E1D0094C4CF /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0725F51E1D0094C4CF /* SceneDelegate.swift */; }; @@ -30,6 +31,7 @@ 3C49030D2B614FFF004D16B4 /* HeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderView.swift; sourceTree = ""; }; 3C8BE8E82B61018C006C66DB /* ListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListViewController.swift; sourceTree = ""; }; 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = " ScheduleType.swift"; sourceTree = ""; }; + 3CEBC8482B6256BD006EF065 /* Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extension.swift; sourceTree = ""; }; 3CECAD4C2B615A4A00D78584 /* NameSpace.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NameSpace.swift; sourceTree = ""; }; C7431F0225F51E1D0094C4CF /* ProjectManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProjectManager.app; sourceTree = BUILT_PRODUCTS_DIR; }; C7431F0525F51E1D0094C4CF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -102,6 +104,7 @@ isa = PBXGroup; children = ( 3CECAD4C2B615A4A00D78584 /* NameSpace.swift */, + 3CEBC8482B6256BD006EF065 /* Extension.swift */, ); path = Utility; sourceTree = ""; @@ -230,6 +233,7 @@ 3CECAD4D2B615A4A00D78584 /* NameSpace.swift in Sources */, C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */, C7431F0825F51E1D0094C4CF /* SceneDelegate.swift in Sources */, + 3CEBC8492B6256BE006EF065 /* Extension.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ProjectManager/ProjectManager/View/MainViewController.swift b/ProjectManager/ProjectManager/View/MainViewController.swift index ac25f6e26..ce6127cd8 100644 --- a/ProjectManager/ProjectManager/View/MainViewController.swift +++ b/ProjectManager/ProjectManager/View/MainViewController.swift @@ -49,6 +49,9 @@ final class MainViewController: UIViewController { setupStackViewConstraint() } + + override func viewDidAppear(_ animated: Bool) { + footerView.addTopBorder(at: .top, color: .gray, thickness: 0.3) } // MARK: - Helper From 45e01ef9c507ff2db4f658dafe4f4f39f55dc11b Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 18:05:08 +0900 Subject: [PATCH 33/46] =?UTF-8?q?Feat:=20ListTableViewCell=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager.xcodeproj/project.pbxproj | 4 ++++ .../ProjectManager/View/ListTableViewCell.swift | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 ProjectManager/ProjectManager/View/ListTableViewCell.swift diff --git a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj index 9d5c3edd3..bfb508c34 100644 --- a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj +++ b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj @@ -18,6 +18,7 @@ 3C8D87FE2B5FB98000D7BD42 /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FD2B5FB98000D7BD42 /* Realm */; }; 3C8D88002B5FB98000D7BD42 /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FF2B5FB98000D7BD42 /* RealmSwift */; }; 3CEBC8492B6256BE006EF065 /* Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CEBC8482B6256BD006EF065 /* Extension.swift */; }; + 3CEBC84B2B625B80006EF065 /* ListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CEBC84A2B625B80006EF065 /* ListTableViewCell.swift */; }; 3CECAD4D2B615A4A00D78584 /* NameSpace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CECAD4C2B615A4A00D78584 /* NameSpace.swift */; }; C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0525F51E1D0094C4CF /* AppDelegate.swift */; }; C7431F0825F51E1D0094C4CF /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0725F51E1D0094C4CF /* SceneDelegate.swift */; }; @@ -32,6 +33,7 @@ 3C8BE8E82B61018C006C66DB /* ListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListViewController.swift; sourceTree = ""; }; 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = " ScheduleType.swift"; sourceTree = ""; }; 3CEBC8482B6256BD006EF065 /* Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extension.swift; sourceTree = ""; }; + 3CEBC84A2B625B80006EF065 /* ListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListTableViewCell.swift; sourceTree = ""; }; 3CECAD4C2B615A4A00D78584 /* NameSpace.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NameSpace.swift; sourceTree = ""; }; C7431F0225F51E1D0094C4CF /* ProjectManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProjectManager.app; sourceTree = BUILT_PRODUCTS_DIR; }; C7431F0525F51E1D0094C4CF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -80,6 +82,7 @@ C7431F0925F51E1D0094C4CF /* MainViewController.swift */, 3C8BE8E82B61018C006C66DB /* ListViewController.swift */, 3C49030D2B614FFF004D16B4 /* HeaderView.swift */, + 3CEBC84A2B625B80006EF065 /* ListTableViewCell.swift */, ); path = View; sourceTree = ""; @@ -231,6 +234,7 @@ C7431F0A25F51E1D0094C4CF /* MainViewController.swift in Sources */, 3C8BE8E92B61018C006C66DB /* ListViewController.swift in Sources */, 3CECAD4D2B615A4A00D78584 /* NameSpace.swift in Sources */, + 3CEBC84B2B625B80006EF065 /* ListTableViewCell.swift in Sources */, C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */, C7431F0825F51E1D0094C4CF /* SceneDelegate.swift in Sources */, 3CEBC8492B6256BE006EF065 /* Extension.swift in Sources */, diff --git a/ProjectManager/ProjectManager/View/ListTableViewCell.swift b/ProjectManager/ProjectManager/View/ListTableViewCell.swift new file mode 100644 index 000000000..1ef584e34 --- /dev/null +++ b/ProjectManager/ProjectManager/View/ListTableViewCell.swift @@ -0,0 +1,17 @@ +// +// ListTableViewCell.swift +// ProjectManager +// +// Created by Toy on 1/25/24. +// + +import UIKit + +final class ListTableViewCell: UITableViewCell { + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + } + +} From c7b136cb50c5910e25ef36eefdc2e7c01ef42e79 Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 18:25:34 +0900 Subject: [PATCH 34/46] =?UTF-8?q?Feat:=20=EC=83=9D=EC=84=B1=EC=9E=90=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84=20=EB=B0=8F=20identifier=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager/View/ListTableViewCell.swift | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/ListTableViewCell.swift b/ProjectManager/ProjectManager/View/ListTableViewCell.swift index 1ef584e34..eddc03ed7 100644 --- a/ProjectManager/ProjectManager/View/ListTableViewCell.swift +++ b/ProjectManager/ProjectManager/View/ListTableViewCell.swift @@ -8,10 +8,23 @@ import UIKit final class ListTableViewCell: UITableViewCell { + // MARK: - Property + static let identifier = String(describing: ListViewController.self) + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + override func setSelected(_ selected: Bool, animated: Bool) { super.setSelected(selected, animated: animated) } - + + // MARK: - Helper + } From d70a86395325f4452db3a446f6b497ffefc73109 Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 18:25:48 +0900 Subject: [PATCH 35/46] =?UTF-8?q?Feat:=20Cell=20=EB=93=B1=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager/View/ListViewController.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/ListViewController.swift b/ProjectManager/ProjectManager/View/ListViewController.swift index c9b01bf6e..d53ccf5f2 100644 --- a/ProjectManager/ProjectManager/View/ListViewController.swift +++ b/ProjectManager/ProjectManager/View/ListViewController.swift @@ -53,6 +53,7 @@ final class ListViewController: UIViewController { private func setupTableView() { tableView.delegate = self tableView.dataSource = self + tableView.register(ListTableViewCell.self, forCellReuseIdentifier: ListTableViewCell.identifier) } private func setupStackView() { @@ -79,7 +80,11 @@ extension ListViewController: UITableViewDataSource { } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - return UITableViewCell() + guard let cell = tableView.dequeueReusableCell(withIdentifier: ListTableViewCell.identifier, for: indexPath) as? ListTableViewCell else { + return UITableViewCell() + } + + return cell } } From 4b64dc0381e91b060945023f7ab8711141a78631 Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 23:46:45 +0900 Subject: [PATCH 36/46] =?UTF-8?q?Feat:=20Cell=20=EC=97=90=20Label=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/ListTableViewCell.swift | 47 ++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/ListTableViewCell.swift b/ProjectManager/ProjectManager/View/ListTableViewCell.swift index eddc03ed7..75261783d 100644 --- a/ProjectManager/ProjectManager/View/ListTableViewCell.swift +++ b/ProjectManager/ProjectManager/View/ListTableViewCell.swift @@ -10,10 +10,40 @@ import UIKit final class ListTableViewCell: UITableViewCell { // MARK: - Property static let identifier = String(describing: ListViewController.self) + // text 는 테스트용으로 설정하였습니다. + // 다음 스텝에서 수정하겠습니다. + private let titleLabel = { + let label = UILabel() + label.text = "title test" + return label + }() + + private let bodyLabel = { + let label = UILabel() + label.text = "body test" + return label + }() + + private let dateLabel = { + let label = UILabel() + label.text = "2024. 01. 25 test" + return label + }() + + private let stackView = { + let stackView = UIStackView() + stackView.axis = .vertical + stackView.distribution = .fill + stackView.alignment = .fill + stackView.spacing = 4 + stackView.translatesAutoresizingMaskIntoConstraints = false + return stackView + }() override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) - + setupStackView() + setupStackViewConstraint() } required init?(coder: NSCoder) { @@ -26,5 +56,20 @@ final class ListTableViewCell: UITableViewCell { } // MARK: - Helper + private func setupStackView() { + stackView.addArrangedSubview(titleLabel) + stackView.addArrangedSubview(bodyLabel) + stackView.addArrangedSubview(dateLabel) + self.addSubview(stackView) + } + + private func setupStackViewConstraint() { + NSLayoutConstraint.activate([ + stackView.topAnchor.constraint(equalTo: self.topAnchor, constant: 10), + stackView.trailingAnchor.constraint(equalTo: self.trailingAnchor, constant: -10), + stackView.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -10), + stackView.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: 10) + ]) + } } From 2e28eacf25708acb88ef2e0b2c20a4e3be085133 Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 25 Jan 2024 23:54:08 +0900 Subject: [PATCH 37/46] =?UTF-8?q?Refactor:=20headerView=20title=20?= =?UTF-8?q?=EA=B8=80=EC=9E=90=20=ED=81=AC=EA=B8=B0=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EB=B0=8F=20=EB=91=90=EA=BB=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/View/HeaderView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/HeaderView.swift b/ProjectManager/ProjectManager/View/HeaderView.swift index f17fec59c..947a3b9d4 100644 --- a/ProjectManager/ProjectManager/View/HeaderView.swift +++ b/ProjectManager/ProjectManager/View/HeaderView.swift @@ -11,7 +11,7 @@ final class HeaderView: UIView { // MARK: - Property private let titleLabel = { let label = UILabel() - label.font = UIFont.systemFont(ofSize: 30) + label.font = UIFont.systemFont(ofSize: 32, weight: .regular) return label }() From b207533b949b93ee59904704db1995c6ceff030c Mon Sep 17 00:00:00 2001 From: Nova Date: Fri, 26 Jan 2024 00:15:06 +0900 Subject: [PATCH 38/46] =?UTF-8?q?Feat:=20Cell=20Label=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager/View/ListTableViewCell.swift | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/ProjectManager/ProjectManager/View/ListTableViewCell.swift b/ProjectManager/ProjectManager/View/ListTableViewCell.swift index 75261783d..ceee5ce58 100644 --- a/ProjectManager/ProjectManager/View/ListTableViewCell.swift +++ b/ProjectManager/ProjectManager/View/ListTableViewCell.swift @@ -14,19 +14,29 @@ final class ListTableViewCell: UITableViewCell { // 다음 스텝에서 수정하겠습니다. private let titleLabel = { let label = UILabel() - label.text = "title test" + label.text = "title testbody testbody testbody testbody testbody testbody testbody testbody testbody test" + label.font = UIFont.systemFont(ofSize: 22) + label.lineBreakMode = .byTruncatingTail + label.numberOfLines = 1 return label }() private let bodyLabel = { let label = UILabel() - label.text = "body test" + label.text = """ + body testbody testbodybody testbody testbodybody testbody testbodybody testbody testbodybody testbody testbodybody testbody testbody + """ + label.font = UIFont.systemFont(ofSize: 18) + label.textColor = .lightGray + label.lineBreakMode = .byTruncatingTail + label.numberOfLines = 3 return label }() private let dateLabel = { let label = UILabel() - label.text = "2024. 01. 25 test" + label.text = "2024. 01. 25. test" + label.font = UIFont.systemFont(ofSize: 15) return label }() From f1351fd022e5b9fe7ae13532d5ec1733cb4c93cf Mon Sep 17 00:00:00 2001 From: Nova Date: Fri, 26 Jan 2024 00:42:11 +0900 Subject: [PATCH 39/46] =?UTF-8?q?Feat:=20UITableView=20Delegate=20?= =?UTF-8?q?=EB=A9=94=EC=84=9C=EB=93=9C=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/View/ListViewController.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ProjectManager/ProjectManager/View/ListViewController.swift b/ProjectManager/ProjectManager/View/ListViewController.swift index d53ccf5f2..67d769dd7 100644 --- a/ProjectManager/ProjectManager/View/ListViewController.swift +++ b/ProjectManager/ProjectManager/View/ListViewController.swift @@ -14,6 +14,7 @@ final class ListViewController: UIViewController { private let tableView = { let tableView = UITableView() tableView.backgroundColor = .systemGray6 + tableView.separatorStyle = .none return tableView }() @@ -91,5 +92,7 @@ extension ListViewController: UITableViewDataSource { // MARK: - UITableViewDelegate Method extension ListViewController: UITableViewDelegate { - + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + tableView.deselectRow(at: indexPath, animated: true) + } } From 81af9861e8474f3247a0eb92f774a20d23867138 Mon Sep 17 00:00:00 2001 From: Nova Date: Fri, 26 Jan 2024 03:07:17 +0900 Subject: [PATCH 40/46] =?UTF-8?q?Feat:=20spacingOfRowView=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager.xcodeproj/project.pbxproj | 16 ++++++++--- .../UIView +.swift} | 2 +- .../View/ListTableViewCell.swift | 28 +++++++++++++++---- .../View/ListViewController.swift | 12 +++++--- .../View/MainViewController.swift | 4 +-- 5 files changed, 45 insertions(+), 17 deletions(-) rename ProjectManager/ProjectManager/{Utility/Extension.swift => Extension/UIView +.swift} (90%) diff --git a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj index bfb508c34..b49ae09c3 100644 --- a/ProjectManager/ProjectManager.xcodeproj/project.pbxproj +++ b/ProjectManager/ProjectManager.xcodeproj/project.pbxproj @@ -17,7 +17,7 @@ 3C8BE8EB2B610380006C66DB /* ScheduleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */; }; 3C8D87FE2B5FB98000D7BD42 /* Realm in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FD2B5FB98000D7BD42 /* Realm */; }; 3C8D88002B5FB98000D7BD42 /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 3C8D87FF2B5FB98000D7BD42 /* RealmSwift */; }; - 3CEBC8492B6256BE006EF065 /* Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CEBC8482B6256BD006EF065 /* Extension.swift */; }; + 3CEBC8492B6256BE006EF065 /* UIView +.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CEBC8482B6256BD006EF065 /* UIView +.swift */; }; 3CEBC84B2B625B80006EF065 /* ListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CEBC84A2B625B80006EF065 /* ListTableViewCell.swift */; }; 3CECAD4D2B615A4A00D78584 /* NameSpace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CECAD4C2B615A4A00D78584 /* NameSpace.swift */; }; C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7431F0525F51E1D0094C4CF /* AppDelegate.swift */; }; @@ -32,7 +32,7 @@ 3C49030D2B614FFF004D16B4 /* HeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderView.swift; sourceTree = ""; }; 3C8BE8E82B61018C006C66DB /* ListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListViewController.swift; sourceTree = ""; }; 3C8BE8EA2B610380006C66DB /* ScheduleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = " ScheduleType.swift"; sourceTree = ""; }; - 3CEBC8482B6256BD006EF065 /* Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extension.swift; sourceTree = ""; }; + 3CEBC8482B6256BD006EF065 /* UIView +.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView +.swift"; sourceTree = ""; }; 3CEBC84A2B625B80006EF065 /* ListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListTableViewCell.swift; sourceTree = ""; }; 3CECAD4C2B615A4A00D78584 /* NameSpace.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NameSpace.swift; sourceTree = ""; }; C7431F0225F51E1D0094C4CF /* ProjectManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProjectManager.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -103,11 +103,18 @@ path = Helper; sourceTree = ""; }; + 3CEBC84C2B62D486006EF065 /* Extension */ = { + isa = PBXGroup; + children = ( + 3CEBC8482B6256BD006EF065 /* UIView +.swift */, + ); + path = Extension; + sourceTree = ""; + }; 3CECAD4B2B615A2C00D78584 /* Utility */ = { isa = PBXGroup; children = ( 3CECAD4C2B615A4A00D78584 /* NameSpace.swift */, - 3CEBC8482B6256BD006EF065 /* Extension.swift */, ); path = Utility; sourceTree = ""; @@ -138,6 +145,7 @@ 3C8BE8E52B60EE02006C66DB /* View */, 3C8BE8E62B60EE0B006C66DB /* ViewModel */, 3CECAD4B2B615A2C00D78584 /* Utility */, + 3CEBC84C2B62D486006EF065 /* Extension */, 3C8BE8E72B60EFDB006C66DB /* Helper */, C7431F1325F51E1E0094C4CF /* Info.plist */, 3C353EF82B60B9E70006509D /* GoogleService-Info.plist */, @@ -237,7 +245,7 @@ 3CEBC84B2B625B80006EF065 /* ListTableViewCell.swift in Sources */, C7431F0625F51E1D0094C4CF /* AppDelegate.swift in Sources */, C7431F0825F51E1D0094C4CF /* SceneDelegate.swift in Sources */, - 3CEBC8492B6256BE006EF065 /* Extension.swift in Sources */, + 3CEBC8492B6256BE006EF065 /* UIView +.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ProjectManager/ProjectManager/Utility/Extension.swift b/ProjectManager/ProjectManager/Extension/UIView +.swift similarity index 90% rename from ProjectManager/ProjectManager/Utility/Extension.swift rename to ProjectManager/ProjectManager/Extension/UIView +.swift index 0bbda7a16..58a003fbf 100644 --- a/ProjectManager/ProjectManager/Utility/Extension.swift +++ b/ProjectManager/ProjectManager/Extension/UIView +.swift @@ -8,7 +8,7 @@ import UIKit extension UIView { - func addTopBorder(at position: UIRectEdge, color: UIColor, thickness: CGFloat) { + func addBorder(at position: UIRectEdge, color: UIColor, thickness: CGFloat) { let border = CALayer() border.backgroundColor = color.cgColor diff --git a/ProjectManager/ProjectManager/View/ListTableViewCell.swift b/ProjectManager/ProjectManager/View/ListTableViewCell.swift index ceee5ce58..9823e881a 100644 --- a/ProjectManager/ProjectManager/View/ListTableViewCell.swift +++ b/ProjectManager/ProjectManager/View/ListTableViewCell.swift @@ -40,6 +40,13 @@ final class ListTableViewCell: UITableViewCell { return label }() + private let spacingOfRowView = { + let view = UIView() + view.backgroundColor = .systemGray6 + view.translatesAutoresizingMaskIntoConstraints = false + return view + }() + private let stackView = { let stackView = UIStackView() stackView.axis = .vertical @@ -54,6 +61,7 @@ final class ListTableViewCell: UITableViewCell { super.init(style: style, reuseIdentifier: reuseIdentifier) setupStackView() setupStackViewConstraint() + setupSpacingOfRowViewConstraint() } required init?(coder: NSCoder) { @@ -70,15 +78,25 @@ final class ListTableViewCell: UITableViewCell { stackView.addArrangedSubview(titleLabel) stackView.addArrangedSubview(bodyLabel) stackView.addArrangedSubview(dateLabel) - self.addSubview(stackView) + contentView.addSubview(spacingOfRowView) + contentView.addSubview(stackView) } private func setupStackViewConstraint() { NSLayoutConstraint.activate([ - stackView.topAnchor.constraint(equalTo: self.topAnchor, constant: 10), - stackView.trailingAnchor.constraint(equalTo: self.trailingAnchor, constant: -10), - stackView.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -10), - stackView.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: 10) + stackView.topAnchor.constraint(equalTo: spacingOfRowView.bottomAnchor, constant: 10), + stackView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -10), + stackView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -10), + stackView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 15) + ]) + } + + private func setupSpacingOfRowViewConstraint() { + NSLayoutConstraint.activate([ + spacingOfRowView.topAnchor.constraint(equalTo: contentView.topAnchor), + spacingOfRowView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), + spacingOfRowView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), + spacingOfRowView.heightAnchor.constraint(equalToConstant: 8) ]) } diff --git a/ProjectManager/ProjectManager/View/ListViewController.swift b/ProjectManager/ProjectManager/View/ListViewController.swift index 67d769dd7..d5a9170db 100644 --- a/ProjectManager/ProjectManager/View/ListViewController.swift +++ b/ProjectManager/ProjectManager/View/ListViewController.swift @@ -14,14 +14,13 @@ final class ListViewController: UIViewController { private let tableView = { let tableView = UITableView() tableView.backgroundColor = .systemGray6 - tableView.separatorStyle = .none return tableView }() private lazy var headerView = { - let headerView = HeaderView(frame: .zero, schedule: scheduleType) - headerView.backgroundColor = .systemGray6 - return headerView + let view = HeaderView(frame: .zero, schedule: scheduleType) + view.backgroundColor = .systemGray6 + return view }() private let stackView = { @@ -50,6 +49,11 @@ final class ListViewController: UIViewController { setupStackViewConstraint() } +// override func viewDidAppear(_ animated: Bool) { +// headerView.addBorder(at: .bottom, color: .gray, thickness: 0.5) +// headerView.frame = headerView.frame.inset(by: UIEdgeInsets(top: 0, left: 0, bottom: -10, right: 0)) +// } + // MARK: - Helper private func setupTableView() { tableView.delegate = self diff --git a/ProjectManager/ProjectManager/View/MainViewController.swift b/ProjectManager/ProjectManager/View/MainViewController.swift index ce6127cd8..b52a5d8ab 100644 --- a/ProjectManager/ProjectManager/View/MainViewController.swift +++ b/ProjectManager/ProjectManager/View/MainViewController.swift @@ -26,7 +26,6 @@ final class MainViewController: UIViewController { stackView.alignment = .fill stackView.spacing = 10 stackView.backgroundColor = .systemGray4 - stackView.translatesAutoresizingMaskIntoConstraints = false return stackView }() @@ -47,11 +46,10 @@ final class MainViewController: UIViewController { setupTableStackView() setupStackView() setupStackViewConstraint() - } override func viewDidAppear(_ animated: Bool) { - footerView.addTopBorder(at: .top, color: .gray, thickness: 0.3) + footerView.addBorder(at: .top, color: .gray, thickness: 0.3) } // MARK: - Helper From d9fc4ac2a191c838159ea2dc9a63d382fa11b328 Mon Sep 17 00:00:00 2001 From: Nova Date: Fri, 26 Jan 2024 17:31:34 +0900 Subject: [PATCH 41/46] =?UTF-8?q?Feat:=20Cell=20=EC=82=AC=EC=9D=B4=20?= =?UTF-8?q?=EA=B0=84=EA=B2=A9=20view=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/ListTableViewCell.swift | 72 +++++++++++++------ .../View/ListViewController.swift | 9 +++ 2 files changed, 59 insertions(+), 22 deletions(-) diff --git a/ProjectManager/ProjectManager/View/ListTableViewCell.swift b/ProjectManager/ProjectManager/View/ListTableViewCell.swift index 9823e881a..0189fe78e 100644 --- a/ProjectManager/ProjectManager/View/ListTableViewCell.swift +++ b/ProjectManager/ProjectManager/View/ListTableViewCell.swift @@ -40,14 +40,21 @@ final class ListTableViewCell: UITableViewCell { return label }() + private let lineOfSapcingView = { + let view = UIView() + view.backgroundColor = .systemGray4 + view.heightAnchor.constraint(equalToConstant: 0.8).isActive = true + return view + }() + private let spacingOfRowView = { let view = UIView() view.backgroundColor = .systemGray6 - view.translatesAutoresizingMaskIntoConstraints = false + view.heightAnchor.constraint(equalToConstant: 8).isActive = true return view }() - private let stackView = { + private let labelStackView = { let stackView = UIStackView() stackView.axis = .vertical stackView.distribution = .fill @@ -57,11 +64,19 @@ final class ListTableViewCell: UITableViewCell { return stackView }() + private let spacingStackView = { + let stackView = UIStackView() + stackView.axis = .vertical + stackView.distribution = .fill + stackView.alignment = .fill + stackView.translatesAutoresizingMaskIntoConstraints = false + return stackView + }() + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) - setupStackView() - setupStackViewConstraint() - setupSpacingOfRowViewConstraint() + setupUI() + setupConstraints() } required init?(coder: NSCoder) { @@ -74,30 +89,43 @@ final class ListTableViewCell: UITableViewCell { } // MARK: - Helper - private func setupStackView() { - stackView.addArrangedSubview(titleLabel) - stackView.addArrangedSubview(bodyLabel) - stackView.addArrangedSubview(dateLabel) - contentView.addSubview(spacingOfRowView) - contentView.addSubview(stackView) + private func setupUI() { + setupLabelStackView() + setupSpacingStackView() } - private func setupStackViewConstraint() { + private func setupConstraints() { + setupSpacingStackViewConstraint() + setupLabelStackViewConstraint() + } + + private func setupLabelStackView() { + labelStackView.addArrangedSubview(titleLabel) + labelStackView.addArrangedSubview(bodyLabel) + labelStackView.addArrangedSubview(dateLabel) + contentView.addSubview(labelStackView) + } + + private func setupLabelStackViewConstraint() { NSLayoutConstraint.activate([ - stackView.topAnchor.constraint(equalTo: spacingOfRowView.bottomAnchor, constant: 10), - stackView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -10), - stackView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -10), - stackView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 15) + labelStackView.topAnchor.constraint(equalTo: spacingStackView.bottomAnchor, constant: 10), + labelStackView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -10), + labelStackView.bottomAnchor.constraint(equalTo: contentView.bottomAnchor, constant: -10), + labelStackView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 15) ]) } - private func setupSpacingOfRowViewConstraint() { + private func setupSpacingStackView() { + spacingStackView.addArrangedSubview(lineOfSapcingView) + spacingStackView.addArrangedSubview(spacingOfRowView) + contentView.addSubview(spacingStackView) + } + + private func setupSpacingStackViewConstraint() { NSLayoutConstraint.activate([ - spacingOfRowView.topAnchor.constraint(equalTo: contentView.topAnchor), - spacingOfRowView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), - spacingOfRowView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), - spacingOfRowView.heightAnchor.constraint(equalToConstant: 8) + spacingStackView.topAnchor.constraint(equalTo: contentView.topAnchor), + spacingStackView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor), + spacingStackView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor) ]) } - } diff --git a/ProjectManager/ProjectManager/View/ListViewController.swift b/ProjectManager/ProjectManager/View/ListViewController.swift index d5a9170db..fdcd32d6d 100644 --- a/ProjectManager/ProjectManager/View/ListViewController.swift +++ b/ProjectManager/ProjectManager/View/ListViewController.swift @@ -14,6 +14,7 @@ final class ListViewController: UIViewController { private let tableView = { let tableView = UITableView() tableView.backgroundColor = .systemGray6 + tableView.separatorStyle = .none return tableView }() @@ -92,6 +93,14 @@ extension ListViewController: UITableViewDataSource { return cell } + func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { + return UIView() + } + + func tableView(_ tableView: UITableView, willDisplayFooterView view: UIView, forSection section: Int) { + view.addBorder(at: .top, color: .systemGray4, thickness: 0.8) + } + } // MARK: - UITableViewDelegate Method From 48d505d5fa33671c2d29744a7707a6dd58bbfc3a Mon Sep 17 00:00:00 2001 From: Nova Date: Fri, 26 Jan 2024 18:36:17 +0900 Subject: [PATCH 42/46] =?UTF-8?q?Feat:=20HeaderView=20=EC=97=90=20circleVi?= =?UTF-8?q?ew=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManager/View/HeaderView.swift | 58 ++++++++++++++++++- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/ProjectManager/ProjectManager/View/HeaderView.swift b/ProjectManager/ProjectManager/View/HeaderView.swift index 947a3b9d4..26a227f32 100644 --- a/ProjectManager/ProjectManager/View/HeaderView.swift +++ b/ProjectManager/ProjectManager/View/HeaderView.swift @@ -15,11 +15,31 @@ final class HeaderView: UIView { return label }() + private let circleView = { + let view = UIView() + view.clipsToBounds = true + view.backgroundColor = .black + return view + }() + + // text 는 테스트용으로 설정하였습니다. + // 다음 스텝에서 수정하겠습니다. + private let numberOfCircleLabel = { + let label = UILabel() + label.font = UIFont.systemFont(ofSize: 15, weight: .medium) + label.text = "2" + label.textColor = .white + label.textAlignment = .center + label.translatesAutoresizingMaskIntoConstraints = false + return label + }() + private let stackView = { let stackView = UIStackView() stackView.axis = .horizontal stackView.distribution = .fill stackView.alignment = .fill + stackView.spacing = 10 stackView.translatesAutoresizingMaskIntoConstraints = false return stackView }() @@ -27,17 +47,51 @@ final class HeaderView: UIView { init(frame: CGRect, schedule: Schedule) { self.titleLabel.text = schedule.discription super.init(frame: frame) - setupStackView() - setupStackViewConstraint() + setupUI() + setupConstraints() } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } + override func layoutSubviews() { + circleView.layer.cornerRadius = circleView.frame.size.width / 2 + } + // MARK: - Helper + private func setupUI() { + setupnumberOfCircleLabel() + setupStackView() + } + + private func setupConstraints() { + setupCircleViewConstraint() + setupnumberOfCircleLabelConstraint() + setupStackViewConstraint() + } + + private func setupnumberOfCircleLabel() { + circleView.addSubview(numberOfCircleLabel) + } + + private func setupCircleViewConstraint() { + NSLayoutConstraint.activate([ + circleView.widthAnchor.constraint(equalToConstant: 25), + circleView.heightAnchor.constraint(equalToConstant: 25) + ]) + } + + private func setupnumberOfCircleLabelConstraint() { + NSLayoutConstraint.activate([ + numberOfCircleLabel.centerXAnchor.constraint(equalTo: circleView.centerXAnchor), + numberOfCircleLabel.centerYAnchor.constraint(equalTo: circleView.centerYAnchor) + ]) + } + private func setupStackView() { stackView.addArrangedSubview(titleLabel) + stackView.addArrangedSubview(circleView) self.addSubview(stackView) } From 83e8ff42fbff096f623a2ae169731807446a79b3 Mon Sep 17 00:00:00 2001 From: Nova Date: Sat, 27 Jan 2024 21:18:12 +0900 Subject: [PATCH 43/46] =?UTF-8?q?Refactor:=20=EC=83=9D=EC=84=B1=EC=9E=90?= =?UTF-8?q?=20=EC=9C=84=EC=B9=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/ListViewController.swift | 30 +++++-------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/ProjectManager/ProjectManager/View/ListViewController.swift b/ProjectManager/ProjectManager/View/ListViewController.swift index fdcd32d6d..ded2af5f4 100644 --- a/ProjectManager/ProjectManager/View/ListViewController.swift +++ b/ProjectManager/ProjectManager/View/ListViewController.swift @@ -29,11 +29,18 @@ final class ListViewController: UIViewController { stackView.axis = .vertical stackView.distribution = .fill stackView.alignment = .fill - stackView.spacing = 0 stackView.translatesAutoresizingMaskIntoConstraints = false return stackView }() + // MARK: - Lifecycle + override func viewDidLoad() { + setupTableView() + setupStackView() + setupStackViewConstraint() + } + + // MARK: - Helper init(scheduleType: Schedule) { self.scheduleType = scheduleType super.init(nibName: nil, bundle: nil) @@ -43,19 +50,6 @@ final class ListViewController: UIViewController { fatalError("init(coder:) has not been implemented") } - // MARK: - Lifecycle - override func viewDidLoad() { - setupTableView() - setupStackView() - setupStackViewConstraint() - } - -// override func viewDidAppear(_ animated: Bool) { -// headerView.addBorder(at: .bottom, color: .gray, thickness: 0.5) -// headerView.frame = headerView.frame.inset(by: UIEdgeInsets(top: 0, left: 0, bottom: -10, right: 0)) -// } - - // MARK: - Helper private func setupTableView() { tableView.delegate = self tableView.dataSource = self @@ -93,14 +87,6 @@ extension ListViewController: UITableViewDataSource { return cell } - func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { - return UIView() - } - - func tableView(_ tableView: UITableView, willDisplayFooterView view: UIView, forSection section: Int) { - view.addBorder(at: .top, color: .systemGray4, thickness: 0.8) - } - } // MARK: - UITableViewDelegate Method From 69500572d9c15b7457e70a9a1c5bc750d7de7389 Mon Sep 17 00:00:00 2001 From: Nova Date: Sat, 27 Jan 2024 21:22:55 +0900 Subject: [PATCH 44/46] =?UTF-8?q?Feat:=20headerVier=20=EC=97=90=20border?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/View/HeaderView.swift | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ProjectManager/ProjectManager/View/HeaderView.swift b/ProjectManager/ProjectManager/View/HeaderView.swift index 26a227f32..7ebe23b38 100644 --- a/ProjectManager/ProjectManager/View/HeaderView.swift +++ b/ProjectManager/ProjectManager/View/HeaderView.swift @@ -44,6 +44,13 @@ final class HeaderView: UIView { return stackView }() + // MARK: - Lifecycle + override func layoutSubviews() { + circleView.layer.cornerRadius = circleView.frame.size.width / 2 + self.addBorder(at: .bottom, color: .systemGray4, thickness: 0.8) + } + + // MARK: - Helper init(frame: CGRect, schedule: Schedule) { self.titleLabel.text = schedule.discription super.init(frame: frame) @@ -55,11 +62,6 @@ final class HeaderView: UIView { fatalError("init(coder:) has not been implemented") } - override func layoutSubviews() { - circleView.layer.cornerRadius = circleView.frame.size.width / 2 - } - - // MARK: - Helper private func setupUI() { setupnumberOfCircleLabel() setupStackView() From 20ae86c2214c980e6e1646d119488c5d4e78a9b5 Mon Sep 17 00:00:00 2001 From: Nova Date: Sat, 27 Jan 2024 21:23:39 +0900 Subject: [PATCH 45/46] =?UTF-8?q?Refactor:=20setSelected=20=EB=A9=94?= =?UTF-8?q?=EC=84=9C=EB=93=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/View/ListTableViewCell.swift | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ProjectManager/ProjectManager/View/ListTableViewCell.swift b/ProjectManager/ProjectManager/View/ListTableViewCell.swift index 0189fe78e..86ed48a79 100644 --- a/ProjectManager/ProjectManager/View/ListTableViewCell.swift +++ b/ProjectManager/ProjectManager/View/ListTableViewCell.swift @@ -73,6 +73,7 @@ final class ListTableViewCell: UITableViewCell { return stackView }() + // MARK: - Helper override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) setupUI() @@ -83,12 +84,6 @@ final class ListTableViewCell: UITableViewCell { fatalError("init(coder:) has not been implemented") } - override func setSelected(_ selected: Bool, animated: Bool) { - super.setSelected(selected, animated: animated) - - } - - // MARK: - Helper private func setupUI() { setupLabelStackView() setupSpacingStackView() From 7bfadb9541b300985ad15bb51aa59b5d8860ba00 Mon Sep 17 00:00:00 2001 From: Nova Date: Sat, 27 Jan 2024 21:28:04 +0900 Subject: [PATCH 46/46] =?UTF-8?q?Refactor:=20border=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectManager/ProjectManager/View/HeaderView.swift | 2 +- ProjectManager/ProjectManager/View/ListTableViewCell.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ProjectManager/ProjectManager/View/HeaderView.swift b/ProjectManager/ProjectManager/View/HeaderView.swift index 7ebe23b38..12cada374 100644 --- a/ProjectManager/ProjectManager/View/HeaderView.swift +++ b/ProjectManager/ProjectManager/View/HeaderView.swift @@ -47,7 +47,7 @@ final class HeaderView: UIView { // MARK: - Lifecycle override func layoutSubviews() { circleView.layer.cornerRadius = circleView.frame.size.width / 2 - self.addBorder(at: .bottom, color: .systemGray4, thickness: 0.8) + self.addBorder(at: .bottom, color: .systemGray4, thickness: 0.5) } // MARK: - Helper diff --git a/ProjectManager/ProjectManager/View/ListTableViewCell.swift b/ProjectManager/ProjectManager/View/ListTableViewCell.swift index 86ed48a79..f924ebce1 100644 --- a/ProjectManager/ProjectManager/View/ListTableViewCell.swift +++ b/ProjectManager/ProjectManager/View/ListTableViewCell.swift @@ -43,7 +43,7 @@ final class ListTableViewCell: UITableViewCell { private let lineOfSapcingView = { let view = UIView() view.backgroundColor = .systemGray4 - view.heightAnchor.constraint(equalToConstant: 0.8).isActive = true + view.heightAnchor.constraint(equalToConstant: 0.5).isActive = true return view }()