diff --git a/iOS_Study_A.xcodeproj/project.pbxproj b/MemoClone.xcodeproj/project.pbxproj similarity index 58% rename from iOS_Study_A.xcodeproj/project.pbxproj rename to MemoClone.xcodeproj/project.pbxproj index 1f5c336..7e6105c 100644 --- a/iOS_Study_A.xcodeproj/project.pbxproj +++ b/MemoClone.xcodeproj/project.pbxproj @@ -7,102 +7,116 @@ objects = { /* Begin PBXBuildFile section */ - 954B6B612AC57BE100FDCFAB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 954B6B602AC57BE100FDCFAB /* AppDelegate.swift */; }; - 954B6B632AC57BE100FDCFAB /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 954B6B622AC57BE100FDCFAB /* SceneDelegate.swift */; }; - 954B6B652AC57BE100FDCFAB /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 954B6B642AC57BE100FDCFAB /* ViewController.swift */; }; - 954B6B682AC57BE100FDCFAB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 954B6B662AC57BE100FDCFAB /* Main.storyboard */; }; - 954B6B6A2AC57BE200FDCFAB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 954B6B692AC57BE200FDCFAB /* Assets.xcassets */; }; - 954B6B6D2AC57BE200FDCFAB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 954B6B6B2AC57BE200FDCFAB /* LaunchScreen.storyboard */; }; + DF5218222B0B1B2F007E3E9F /* ModifyMemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF5218212B0B1B2F007E3E9F /* ModifyMemoViewController.swift */; }; + DF5218242B0B1C6B007E3E9F /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF5218232B0B1C6B007E3E9F /* DetailViewController.swift */; }; + DFB4131F2B0A739200DA60B7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFB4131E2B0A739200DA60B7 /* AppDelegate.swift */; }; + DFB413212B0A739200DA60B7 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFB413202B0A739200DA60B7 /* SceneDelegate.swift */; }; + DFB413232B0A739200DA60B7 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFB413222B0A739200DA60B7 /* ViewController.swift */; }; + DFB413282B0A739400DA60B7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DFB413272B0A739400DA60B7 /* Assets.xcassets */; }; + DFB4132B2B0A739400DA60B7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DFB413292B0A739400DA60B7 /* LaunchScreen.storyboard */; }; + DFB413342B0A761600DA60B7 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = DFB413332B0A761600DA60B7 /* SnapKit */; }; + DFB413362B0A76DF00DA60B7 /* MemoTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFB413352B0A76DF00DA60B7 /* MemoTableViewCell.swift */; }; + DFB413382B0A7C4200DA60B7 /* AddMemoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFB413372B0A7C4200DA60B7 /* AddMemoViewController.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 954B6B5D2AC57BE100FDCFAB /* iOS_Study_A.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOS_Study_A.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 954B6B602AC57BE100FDCFAB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 954B6B622AC57BE100FDCFAB /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; - 954B6B642AC57BE100FDCFAB /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 954B6B672AC57BE100FDCFAB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 954B6B692AC57BE200FDCFAB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 954B6B6C2AC57BE200FDCFAB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 954B6B6E2AC57BE200FDCFAB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DF5218212B0B1B2F007E3E9F /* ModifyMemoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModifyMemoViewController.swift; sourceTree = ""; }; + DF5218232B0B1C6B007E3E9F /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = ""; }; + DFB4131B2B0A739200DA60B7 /* MemoClone.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MemoClone.app; sourceTree = BUILT_PRODUCTS_DIR; }; + DFB4131E2B0A739200DA60B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + DFB413202B0A739200DA60B7 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + DFB413222B0A739200DA60B7 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + DFB413272B0A739400DA60B7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + DFB4132A2B0A739400DA60B7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + DFB4132C2B0A739400DA60B7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DFB413352B0A76DF00DA60B7 /* MemoTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MemoTableViewCell.swift; sourceTree = ""; }; + DFB413372B0A7C4200DA60B7 /* AddMemoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMemoViewController.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 954B6B5A2AC57BE100FDCFAB /* Frameworks */ = { + DFB413182B0A739200DA60B7 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + DFB413342B0A761600DA60B7 /* SnapKit in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 954B6B542AC57BE100FDCFAB = { + DFB413122B0A739200DA60B7 = { isa = PBXGroup; children = ( - 954B6B5F2AC57BE100FDCFAB /* iOS_Study_A */, - 954B6B5E2AC57BE100FDCFAB /* Products */, + DFB4131D2B0A739200DA60B7 /* MemoClone */, + DFB4131C2B0A739200DA60B7 /* Products */, ); sourceTree = ""; }; - 954B6B5E2AC57BE100FDCFAB /* Products */ = { + DFB4131C2B0A739200DA60B7 /* Products */ = { isa = PBXGroup; children = ( - 954B6B5D2AC57BE100FDCFAB /* iOS_Study_A.app */, + DFB4131B2B0A739200DA60B7 /* MemoClone.app */, ); name = Products; sourceTree = ""; }; - 954B6B5F2AC57BE100FDCFAB /* iOS_Study_A */ = { + DFB4131D2B0A739200DA60B7 /* MemoClone */ = { isa = PBXGroup; children = ( - 954B6B602AC57BE100FDCFAB /* AppDelegate.swift */, - 954B6B622AC57BE100FDCFAB /* SceneDelegate.swift */, - 954B6B642AC57BE100FDCFAB /* ViewController.swift */, - 954B6B662AC57BE100FDCFAB /* Main.storyboard */, - 954B6B692AC57BE200FDCFAB /* Assets.xcassets */, - 954B6B6B2AC57BE200FDCFAB /* LaunchScreen.storyboard */, - 954B6B6E2AC57BE200FDCFAB /* Info.plist */, + DFB4131E2B0A739200DA60B7 /* AppDelegate.swift */, + DFB413202B0A739200DA60B7 /* SceneDelegate.swift */, + DFB413222B0A739200DA60B7 /* ViewController.swift */, + DFB413272B0A739400DA60B7 /* Assets.xcassets */, + DFB413292B0A739400DA60B7 /* LaunchScreen.storyboard */, + DFB4132C2B0A739400DA60B7 /* Info.plist */, + DFB413352B0A76DF00DA60B7 /* MemoTableViewCell.swift */, + DFB413372B0A7C4200DA60B7 /* AddMemoViewController.swift */, + DF5218212B0B1B2F007E3E9F /* ModifyMemoViewController.swift */, + DF5218232B0B1C6B007E3E9F /* DetailViewController.swift */, ); - path = iOS_Study_A; + path = MemoClone; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 954B6B5C2AC57BE100FDCFAB /* iOS_Study_A */ = { + DFB4131A2B0A739200DA60B7 /* MemoClone */ = { isa = PBXNativeTarget; - buildConfigurationList = 954B6B712AC57BE200FDCFAB /* Build configuration list for PBXNativeTarget "iOS_Study_A" */; + buildConfigurationList = DFB4132F2B0A739400DA60B7 /* Build configuration list for PBXNativeTarget "MemoClone" */; buildPhases = ( - 954B6B592AC57BE100FDCFAB /* Sources */, - 954B6B5A2AC57BE100FDCFAB /* Frameworks */, - 954B6B5B2AC57BE100FDCFAB /* Resources */, + DFB413172B0A739200DA60B7 /* Sources */, + DFB413182B0A739200DA60B7 /* Frameworks */, + DFB413192B0A739200DA60B7 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = iOS_Study_A; - productName = iOS_Study_A; - productReference = 954B6B5D2AC57BE100FDCFAB /* iOS_Study_A.app */; + name = MemoClone; + packageProductDependencies = ( + DFB413332B0A761600DA60B7 /* SnapKit */, + ); + productName = MemoClone; + productReference = DFB4131B2B0A739200DA60B7 /* MemoClone.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 954B6B552AC57BE100FDCFAB /* Project object */ = { + DFB413132B0A739200DA60B7 /* Project object */ = { isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1430; LastUpgradeCheck = 1430; TargetAttributes = { - 954B6B5C2AC57BE100FDCFAB = { + DFB4131A2B0A739200DA60B7 = { CreatedOnToolsVersion = 14.3.1; }; }; }; - buildConfigurationList = 954B6B582AC57BE100FDCFAB /* Build configuration list for PBXProject "iOS_Study_A" */; + buildConfigurationList = DFB413162B0A739200DA60B7 /* Build configuration list for PBXProject "MemoClone" */; compatibilityVersion = "Xcode 14.0"; developmentRegion = en; hasScannedForEncodings = 0; @@ -110,55 +124,53 @@ en, Base, ); - mainGroup = 954B6B542AC57BE100FDCFAB; - productRefGroup = 954B6B5E2AC57BE100FDCFAB /* Products */; + mainGroup = DFB413122B0A739200DA60B7; + packageReferences = ( + DFB413322B0A761600DA60B7 /* XCRemoteSwiftPackageReference "SnapKit" */, + ); + productRefGroup = DFB4131C2B0A739200DA60B7 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 954B6B5C2AC57BE100FDCFAB /* iOS_Study_A */, + DFB4131A2B0A739200DA60B7 /* MemoClone */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 954B6B5B2AC57BE100FDCFAB /* Resources */ = { + DFB413192B0A739200DA60B7 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 954B6B6D2AC57BE200FDCFAB /* LaunchScreen.storyboard in Resources */, - 954B6B6A2AC57BE200FDCFAB /* Assets.xcassets in Resources */, - 954B6B682AC57BE100FDCFAB /* Main.storyboard in Resources */, + DFB4132B2B0A739400DA60B7 /* LaunchScreen.storyboard in Resources */, + DFB413282B0A739400DA60B7 /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 954B6B592AC57BE100FDCFAB /* Sources */ = { + DFB413172B0A739200DA60B7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 954B6B652AC57BE100FDCFAB /* ViewController.swift in Sources */, - 954B6B612AC57BE100FDCFAB /* AppDelegate.swift in Sources */, - 954B6B632AC57BE100FDCFAB /* SceneDelegate.swift in Sources */, + DFB413232B0A739200DA60B7 /* ViewController.swift in Sources */, + DFB4131F2B0A739200DA60B7 /* AppDelegate.swift in Sources */, + DFB413212B0A739200DA60B7 /* SceneDelegate.swift in Sources */, + DFB413382B0A7C4200DA60B7 /* AddMemoViewController.swift in Sources */, + DF5218222B0B1B2F007E3E9F /* ModifyMemoViewController.swift in Sources */, + DFB413362B0A76DF00DA60B7 /* MemoTableViewCell.swift in Sources */, + DF5218242B0B1C6B007E3E9F /* DetailViewController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ - 954B6B662AC57BE100FDCFAB /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 954B6B672AC57BE100FDCFAB /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 954B6B6B2AC57BE200FDCFAB /* LaunchScreen.storyboard */ = { + DFB413292B0A739400DA60B7 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( - 954B6B6C2AC57BE200FDCFAB /* Base */, + DFB4132A2B0A739400DA60B7 /* Base */, ); name = LaunchScreen.storyboard; sourceTree = ""; @@ -166,7 +178,7 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 954B6B6F2AC57BE200FDCFAB /* Debug */ = { + DFB4132D2B0A739400DA60B7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -226,7 +238,7 @@ }; name = Debug; }; - 954B6B702AC57BE200FDCFAB /* Release */ = { + DFB4132E2B0A739400DA60B7 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -280,7 +292,7 @@ }; name = Release; }; - 954B6B722AC57BE200FDCFAB /* Debug */ = { + DFB413302B0A739400DA60B7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; @@ -288,10 +300,9 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = iOS_Study_A/Info.plist; + INFOPLIST_FILE = MemoClone/Info.plist; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; LD_RUNPATH_SEARCH_PATHS = ( @@ -299,7 +310,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "jiyoon.iOS-Study-A"; + PRODUCT_BUNDLE_IDENTIFIER = com.umcstudy.MemoClone; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -307,7 +318,7 @@ }; name = Debug; }; - 954B6B732AC57BE200FDCFAB /* Release */ = { + DFB413312B0A739400DA60B7 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; @@ -315,10 +326,9 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = iOS_Study_A/Info.plist; + INFOPLIST_FILE = MemoClone/Info.plist; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; - INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; LD_RUNPATH_SEARCH_PATHS = ( @@ -326,7 +336,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = "jiyoon.iOS-Study-A"; + PRODUCT_BUNDLE_IDENTIFIER = com.umcstudy.MemoClone; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -337,25 +347,44 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 954B6B582AC57BE100FDCFAB /* Build configuration list for PBXProject "iOS_Study_A" */ = { + DFB413162B0A739200DA60B7 /* Build configuration list for PBXProject "MemoClone" */ = { isa = XCConfigurationList; buildConfigurations = ( - 954B6B6F2AC57BE200FDCFAB /* Debug */, - 954B6B702AC57BE200FDCFAB /* Release */, + DFB4132D2B0A739400DA60B7 /* Debug */, + DFB4132E2B0A739400DA60B7 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 954B6B712AC57BE200FDCFAB /* Build configuration list for PBXNativeTarget "iOS_Study_A" */ = { + DFB4132F2B0A739400DA60B7 /* Build configuration list for PBXNativeTarget "MemoClone" */ = { isa = XCConfigurationList; buildConfigurations = ( - 954B6B722AC57BE200FDCFAB /* Debug */, - 954B6B732AC57BE200FDCFAB /* Release */, + DFB413302B0A739400DA60B7 /* Debug */, + DFB413312B0A739400DA60B7 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + DFB413322B0A761600DA60B7 /* XCRemoteSwiftPackageReference "SnapKit" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SnapKit/SnapKit.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + DFB413332B0A761600DA60B7 /* SnapKit */ = { + isa = XCSwiftPackageProductDependency; + package = DFB413322B0A761600DA60B7 /* XCRemoteSwiftPackageReference "SnapKit" */; + productName = SnapKit; + }; +/* End XCSwiftPackageProductDependency section */ }; - rootObject = 954B6B552AC57BE100FDCFAB /* Project object */; + rootObject = DFB413132B0A739200DA60B7 /* Project object */; } diff --git a/iOS_Study_A.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MemoClone.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from iOS_Study_A.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to MemoClone.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/iOS_Study_A.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/MemoClone.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from iOS_Study_A.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to MemoClone.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/MemoClone.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/MemoClone.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..009c162 --- /dev/null +++ b/MemoClone.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "snapkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SnapKit/SnapKit.git", + "state" : { + "revision" : "f222cbdf325885926566172f6f5f06af95473158", + "version" : "5.6.0" + } + } + ], + "version" : 2 +} diff --git a/MemoClone/AddMemoViewController.swift b/MemoClone/AddMemoViewController.swift new file mode 100644 index 0000000..edecc01 --- /dev/null +++ b/MemoClone/AddMemoViewController.swift @@ -0,0 +1,111 @@ +// +// AddButtonViewController.swift +// MemoClone +// +// Created by 박현수 on 2023/11/20. +// + +import UIKit +import SnapKit + +protocol MemoAddDelegate: AnyObject { + func didAddMemo(title: String, content: String) +} + +class AddMemoViewController: UIViewController, UITextViewDelegate { + + weak var delegate: MemoAddDelegate? + + @objc func registerMemo() { + if (titleText.textColor == .lightGray || contentText.textColor == .gray || titleText.text.isEmpty || contentText.text.isEmpty) { + print("잘못된 제목 또는 내용입니다.") + return + } + delegate?.didAddMemo(title: titleText.text, content: contentText.text) + _ = self.navigationController?.popViewController(animated: true) + } + + var titleText: UITextView = { + let text = UITextView() + text.layer.cornerRadius = 5 + text.layer.borderWidth = 0.5 + text.text = "제목 입력" + text.textColor = UIColor.lightGray + text.tag = 1 + return text + }() + + var contentText: UITextView = { + let text = UITextView() + text.layer.cornerRadius = 5 + text.layer.borderWidth = 0.5 + text.text = "내용 입력" + text.textColor = UIColor.gray + text.tag = 2 + return text + }() + + func textViewDidBeginEditing(_ textView: UITextView) { + if textView.tag == 1 { + if textView.textColor == UIColor.lightGray { + textView.text = nil + textView.textColor = UIColor.black + } + } + else if textView.tag == 2 { + if textView.textColor == UIColor.gray { + textView.text = nil + textView.textColor = UIColor.black + } + } + } + + func configureSubviews() { + view.addSubview(titleText) + view.addSubview(contentText) + } + + func makeConstraints() { + titleText.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide).offset(50) + make.leading.equalToSuperview().inset(50) + make.trailing.equalToSuperview().inset(50) + make.height.equalTo(50) + } + contentText.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide).offset(150) + make.leading.equalToSuperview().inset(50) + make.trailing.equalToSuperview().inset(50) + make.height.equalTo(50) + } + } + + override func viewDidLoad() { + super.viewDidLoad() + + let rightButton = UIBarButtonItem(title: "작성하기", style: .plain, target: self, action: #selector(registerMemo)) + + titleText.delegate = self + contentText.delegate = self + configureSubviews() + makeConstraints() + + view.backgroundColor = .white + navigationItem.title = "메모 작성" + navigationItem.rightBarButtonItem = rightButton + + // Do any additional setup after loading the view. + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/iOS_Study_A/AppDelegate.swift b/MemoClone/AppDelegate.swift similarity index 95% rename from iOS_Study_A/AppDelegate.swift rename to MemoClone/AppDelegate.swift index a37563b..e6e9629 100644 --- a/iOS_Study_A/AppDelegate.swift +++ b/MemoClone/AppDelegate.swift @@ -1,8 +1,8 @@ // // AppDelegate.swift -// iOS_Study_A +// MemoClone // -// Created by 박지윤 on 2023/09/28. +// Created by 박현수 on 2023/11/20. // import UIKit diff --git a/iOS_Study_A/Assets.xcassets/AccentColor.colorset/Contents.json b/MemoClone/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from iOS_Study_A/Assets.xcassets/AccentColor.colorset/Contents.json rename to MemoClone/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/iOS_Study_A/Assets.xcassets/AppIcon.appiconset/Contents.json b/MemoClone/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from iOS_Study_A/Assets.xcassets/AppIcon.appiconset/Contents.json rename to MemoClone/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/iOS_Study_A/Assets.xcassets/Contents.json b/MemoClone/Assets.xcassets/Contents.json similarity index 100% rename from iOS_Study_A/Assets.xcassets/Contents.json rename to MemoClone/Assets.xcassets/Contents.json diff --git a/iOS_Study_A/Base.lproj/LaunchScreen.storyboard b/MemoClone/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from iOS_Study_A/Base.lproj/LaunchScreen.storyboard rename to MemoClone/Base.lproj/LaunchScreen.storyboard diff --git a/MemoClone/DetailViewController.swift b/MemoClone/DetailViewController.swift new file mode 100644 index 0000000..0c17140 --- /dev/null +++ b/MemoClone/DetailViewController.swift @@ -0,0 +1,96 @@ +// +// DetailViewController.swift +// MemoClone +// +// Created by 박현수 on 2023/11/20. +// + +import UIKit +import SnapKit + +protocol ModifyMainViewDelegate: AnyObject { + func modifyArray(title: String, content: String, cellIndex: Int) +} + +class DetailViewController: UIViewController, ModifyMemoDelegate { + + var modifyMainViewDelegate: ModifyMainViewDelegate? + + func memoModified(index: Int, cellTitle: String, cellContent: String) { + modifyMainViewDelegate?.modifyArray(title: cellTitle, content: cellContent, cellIndex: index) + isModified = true + } + + var cellIndex: Int = 0 + var isModified: Bool = false + + var titleLabel: UILabel = { + let title = UILabel() + title.font = .boldSystemFont(ofSize: 20) + return title + }() + + var contentLabel: UILabel = { + let content = UILabel() + content.font = .systemFont(ofSize: 15) + return content + }() + + @objc func modifyMemo() { + let modifyView = ModifyMemoViewController() + modifyView.modifyMemoDelegate = self + modifyView.titleText.text = titleLabel.text + modifyView.contentText.text = contentLabel.text + modifyView.cellIndex = cellIndex + _ = self.navigationController?.pushViewController(modifyView, animated: true) + } + + func configureSubViews() { + view.addSubview(titleLabel) + view.addSubview(contentLabel) + } + + func makeConstraints() { + titleLabel.snp.makeConstraints { make in + make.leading.equalTo(view.safeAreaLayoutGuide).inset(20) + make.trailing.equalTo(view.safeAreaLayoutGuide).inset(20) + make.top.equalTo(view.safeAreaLayoutGuide).offset(10) + } + contentLabel.snp.makeConstraints { make in + make.leading.equalTo(view.safeAreaLayoutGuide).inset(20) + make.trailing.equalTo(view.safeAreaLayoutGuide).inset(20) + make.top.equalTo(titleLabel.snp.bottom).offset(10) + } + } + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .white + + let rightButton = UIBarButtonItem(title: "수정하기", style: .plain, target: self, action: #selector(modifyMemo)) + navigationItem.title = "메모 상세" + navigationItem.rightBarButtonItem = rightButton + + configureSubViews() + makeConstraints() + // Do any additional setup after loading the view. + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + if isModified == true { + _ = self.navigationController?.popViewController(animated: false) + } + } + + + /* + // MARK: - Navigation + + // In a storyboard-based application, you will often want to do a little preparation before navigation + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { + // Get the new view controller using segue.destination. + // Pass the selected object to the new view controller. + } + */ + +} diff --git a/iOS_Study_A/Info.plist b/MemoClone/Info.plist similarity index 90% rename from iOS_Study_A/Info.plist rename to MemoClone/Info.plist index dd3c9af..0eb786d 100644 --- a/iOS_Study_A/Info.plist +++ b/MemoClone/Info.plist @@ -15,8 +15,6 @@ Default Configuration UISceneDelegateClassName $(PRODUCT_MODULE_NAME).SceneDelegate - UISceneStoryboardFile - Main diff --git a/MemoClone/MemoTableViewCell.swift b/MemoClone/MemoTableViewCell.swift new file mode 100644 index 0000000..6a2dd57 --- /dev/null +++ b/MemoClone/MemoTableViewCell.swift @@ -0,0 +1,55 @@ +// +// MemoTableViewCell.swift +// MemoClone +// +// Created by 박현수 on 2023/11/20. +// + +import UIKit +import SnapKit + +class MemoTableViewCell: UITableViewCell { + + static let identifier = "MemoTableViewCell" + + var titleLabel: UILabel = { + let label = UILabel() + label.font = .boldSystemFont(ofSize: 15) + return label + }() + + var contentLabel: UILabel = { + let label = UILabel() + label.font = .systemFont(ofSize: 10) + return label + }() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + configureSubviews() + makeConstraints() + } + + override func awakeFromNib() { + super.awakeFromNib() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func configureSubviews() { + contentView.addSubview(titleLabel) + contentView.addSubview(contentLabel) + } + + func makeConstraints() { + titleLabel.snp.makeConstraints { make in + make.top.leading.trailing.equalTo(contentView).inset(15) + } + contentLabel.snp.makeConstraints { make in + make.top.equalTo(titleLabel.snp.bottom).offset(5) + make.leading.trailing.bottom.equalTo(contentView).inset(15) + } + } +} diff --git a/MemoClone/ModifyMemoViewController.swift b/MemoClone/ModifyMemoViewController.swift new file mode 100644 index 0000000..d997c02 --- /dev/null +++ b/MemoClone/ModifyMemoViewController.swift @@ -0,0 +1,80 @@ +// +// ModifyMemoViewController.swift +// MemoClone +// +// Created by 박현수 on 2023/11/20. +// + +import UIKit +import SnapKit + +protocol ModifyMemoDelegate{ + func memoModified(index: Int, cellTitle: String, cellContent: String) +} + +class ModifyMemoViewController: UIViewController { + + var modifyMemoDelegate: ModifyMemoDelegate? + + var cellIndex: Int = 0 + + var titleText: UITextView = { + let text = UITextView() + text.layer.cornerRadius = 5 + text.layer.borderWidth = 0.5 + return text + }() + + var contentText: UITextView = { + let text = UITextView() + text.layer.cornerRadius = 5 + text.layer.borderWidth = 0.5 + text.textColor = UIColor.gray + return text + }() + + @objc func modifyMemo() { + modifyMemoDelegate?.memoModified(index: cellIndex, cellTitle: titleText.text, cellContent: contentText.text) + navigationController?.popViewController(animated: true) + } + + func configureSubviews() { + view.addSubview(titleText) + view.addSubview(contentText) + } + + func makeConstraints() { + titleText.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide).offset(50) + make.leading.equalToSuperview().inset(50) + make.trailing.equalToSuperview().inset(50) + make.height.equalTo(50) + } + contentText.snp.makeConstraints { make in + make.top.equalTo(view.safeAreaLayoutGuide).offset(150) + make.leading.equalToSuperview().inset(50) + make.trailing.equalToSuperview().inset(50) + make.height.equalTo(50) + } + } + + override func viewDidLoad() { + super.viewDidLoad() + + /*let rightButton = UIBarButtonItem(title: "수정하기", style: .plain, target: self, action: #selector(modifyMemo)) + + titleText.delegate = self + contentText.delegate = self*/ + configureSubviews() + makeConstraints() + + let rightButton = UIBarButtonItem(title: "수정하기", style: .plain, target: self, action: #selector(modifyMemo)) + + view.backgroundColor = .white + navigationItem.title = "메모 수정" + navigationItem.rightBarButtonItem = rightButton + //navigationItem.rightBarButtonItem = rightButton + // Do any additional setup after loading the view. + } +} + diff --git a/iOS_Study_A/SceneDelegate.swift b/MemoClone/SceneDelegate.swift similarity index 77% rename from iOS_Study_A/SceneDelegate.swift rename to MemoClone/SceneDelegate.swift index aaf78de..0623afc 100644 --- a/iOS_Study_A/SceneDelegate.swift +++ b/MemoClone/SceneDelegate.swift @@ -1,8 +1,8 @@ // // SceneDelegate.swift -// iOS_Study_A +// MemoClone // -// Created by 박지윤 on 2023/09/28. +// Created by 박현수 on 2023/11/20. // import UIKit @@ -13,10 +13,14 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { - // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. - // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. - // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). - guard let _ = (scene as? UIWindowScene) else { return } + guard let windowScene = (scene as? UIWindowScene) else { return } + window = UIWindow(windowScene: windowScene) + + let mainViewController = ViewController() + let navigationController = UINavigationController(rootViewController: mainViewController) + + window?.rootViewController = navigationController + window?.makeKeyAndVisible() } func sceneDidDisconnect(_ scene: UIScene) { diff --git a/MemoClone/ViewController.swift b/MemoClone/ViewController.swift new file mode 100644 index 0000000..2d86b94 --- /dev/null +++ b/MemoClone/ViewController.swift @@ -0,0 +1,110 @@ +// +// ViewController.swift +// MemoClone +// +// Created by 박현수 on 2023/11/20. +// + +import UIKit +import SnapKit + + +class ViewController: UIViewController, MemoAddDelegate, ModifyMainViewDelegate { + func modifyArray(title: String, content: String, cellIndex: Int) { + titleArray[cellIndex] = title + contentArray[cellIndex] = content + memoTableView.reloadData() + } + + + func didAddMemo(title: String, content: String) { + titleArray.append(title) + contentArray.append(content) + memoTableView.reloadData() + } + + + var titleArray: [String] = [] + var contentArray: [String] = [] + + var memoTableView: UITableView = { + let tableView = UITableView() + tableView.backgroundColor = .white + tableView.register(MemoTableViewCell.self, forCellReuseIdentifier: MemoTableViewCell.identifier) + return tableView + }() + + @objc func addButtonTapped() { + let addMemoViewController = AddMemoViewController() + addMemoViewController.delegate = self + self.navigationController?.pushViewController(addMemoViewController, animated: true) + } + + func configureSubviews() { + view.addSubview(memoTableView) + } + + func makeConstraints() { + memoTableView.snp.makeConstraints { make in + make.edges.equalTo(view.safeAreaLayoutGuide) + } + } + + override func viewDidLoad() { + super.viewDidLoad() + configureSubviews() + makeConstraints() + memoTableView.dataSource = self + memoTableView.delegate = self + setNavigationBar() + + func setNavigationBar() { + let addButton = UIBarButtonItem(image: UIImage(systemName: "plus"), style: .plain, target: self, action: #selector(addButtonTapped)) + + navigationItem.title = "메모장" + navigationItem.rightBarButtonItem = addButton + } + // Do any additional setup after loading the view. + } +} + +extension ViewController: UITableViewDelegate, UITableViewDataSource { + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return titleArray.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + guard let cell = memoTableView.dequeueReusableCell(withIdentifier: MemoTableViewCell.identifier, for: indexPath) as? MemoTableViewCell else { return UITableViewCell() } + + + cell.titleLabel.text = titleArray[indexPath.row] + cell.contentLabel.text = contentArray[indexPath.row] + + return cell + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + return 100 + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let detailView = DetailViewController() + detailView.cellIndex = indexPath.row + detailView.titleLabel.text = titleArray[indexPath.row] + detailView.contentLabel.text = contentArray[indexPath.row] + detailView.modifyMainViewDelegate = self + self.navigationController?.pushViewController(detailView, animated: true) + } + + func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) { + if editingStyle == .delete { + tableView.beginUpdates() + tableView.deleteRows(at: [indexPath], with: .fade) + titleArray.remove(at: indexPath.row) + contentArray.remove(at: indexPath.row) + tableView.endUpdates() + } + } +} + diff --git a/README.md b/README.md deleted file mode 100644 index 2f1e30e..0000000 --- a/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# 🍎 iOS_Study_A -SSUMC 5기 iOS 스터디 A조 - -![umc+logo](https://github.com/SSUMC-5th-iOS/iOS_Study_A/assets/84546438/ae41d05c-6f71-47bc-9944-84230b5d4dd6) - -## 💻 Member -| 김수민 | 김민지 | 박현수 | 신혜림 | -| :---------:|:----------:|:----------:|:----------:| -| 루시 | 미니 | 숲 | 제로 | -| [kimsoomin20221789](https://github.com/kimsoomin20221789) | [kxmmxnzx](https://github.com/kxmmxnzx) | [00yhsp](https://github.com/00yhsp) | [tlsgPFla](https://github.com/tlsgPFla) | - -## 📖 Workbook (프리마스터) -| 주차 | 내용 | 미션 | -| --- | --- | --- | -| 1주차 | `Platform` | 배달의 민족 홈 화면 구현하기(1) | -| 2주차 | `AutoLayout` | 배달의 민족 홈 화면 구현하기(2) | -| 3주차 | `TableView & CollectionView` | 당근마켓 홈 화면 구현하기(1) | -| 4주차 | `ScrollView` | 당근마켓 홈 화면 구현하기(2) | -| 5주차 | `View Transition with Data` | 배달의 민족 장바구니로 데이터 넘기 | -| 6주차 | `Open Source` | 라이브러리 2개 이상 사용해서 뷰 만들기 | -| 7주차 | `Token & Social Login` | 카카오 로그인 구현하기 | -| 8주차 | `DB & DBMS` | 간단한 로그인, 회원가입 화면 만들기 - UserDefaults | -| 9주차 | `Network` | Open API 활용하기 | -| 9주차 | `Instagram Clone Coding` | 인스타그램 클론 코딩하기 | - -## 🌳 branch 규칙 -`닉네임/주차` - - - ex) bibi/week1 - -## 👾 Udemy -- https://www.udemy.com/course/comgongbro_ios_clonecoding/ diff --git a/iOS_Study_A.xcodeproj/xcuserdata/jiyoon.xcuserdatad/xcschemes/xcschememanagement.plist b/iOS_Study_A.xcodeproj/xcuserdata/jiyoon.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index d6ece4b..0000000 --- a/iOS_Study_A.xcodeproj/xcuserdata/jiyoon.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - SchemeUserState - - iOS_Study_A.xcscheme_^#shared#^_ - - orderHint - 0 - - - - diff --git a/iOS_Study_A/Base.lproj/Main.storyboard b/iOS_Study_A/Base.lproj/Main.storyboard deleted file mode 100644 index 25a7638..0000000 --- a/iOS_Study_A/Base.lproj/Main.storyboard +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/iOS_Study_A/ViewController.swift b/iOS_Study_A/ViewController.swift deleted file mode 100644 index 0804a27..0000000 --- a/iOS_Study_A/ViewController.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ViewController.swift -// iOS_Study_A -// -// Created by 박지윤 on 2023/09/28. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view. - } - - -} -