diff --git a/Hara_Demo/Hara_Demo.xcodeproj/project.pbxproj b/Hara_Demo/Hara_Demo.xcodeproj/project.pbxproj index 83d6606..8d1d821 100644 --- a/Hara_Demo/Hara_Demo.xcodeproj/project.pbxproj +++ b/Hara_Demo/Hara_Demo.xcodeproj/project.pbxproj @@ -7,14 +7,21 @@ objects = { /* Begin PBXBuildFile section */ - 85825A0F29DA8FDC00850131 /* WorryVM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85825A0E29DA8FDC00850131 /* WorryVM.swift */; }; + 8523A4F32A532E8C00F03A51 /* WriteModalVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8523A4F22A532E8C00F03A51 /* WriteModalVC.swift */; }; + 8523A4F52A532F7B00F03A51 /* WriteModalCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8523A4F42A532F7B00F03A51 /* WriteModalCVC.swift */; }; + 854A6B042A52C83F000EBE1C /* WriteVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 854A6B032A52C83F000EBE1C /* WriteVC.swift */; }; + 854A6B062A52C8F6000EBE1C /* HomeVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 854A6B052A52C8F6000EBE1C /* HomeVC.swift */; }; + 854A6B092A52CA75000EBE1C /* SwiftyColor in Frameworks */ = {isa = PBXBuildFile; productRef = 854A6B082A52CA75000EBE1C /* SwiftyColor */; }; + 85825A0F29DA8FDC00850131 /* WorryViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85825A0E29DA8FDC00850131 /* WorryViewModel.swift */; }; 85825A1329DA901C00850131 /* WorryListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85825A1229DA901C00850131 /* WorryListModel.swift */; }; 85825A1529DA902A00850131 /* WorryListHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85825A1429DA902A00850131 /* WorryListHeaderView.swift */; }; - 85825A1729DA903600850131 /* WorryCV.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85825A1629DA903600850131 /* WorryCV.swift */; }; - 85825A1929DA904000850131 /* WorryCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85825A1829DA904000850131 /* WorryCVC.swift */; }; + 85825A1729DA903600850131 /* StorageVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85825A1629DA903600850131 /* StorageVC.swift */; }; + 85825A1929DA904000850131 /* StorageCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85825A1829DA904000850131 /* StorageCVC.swift */; }; 85825A1C29DA905A00850131 /* TemplateListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85825A1B29DA905A00850131 /* TemplateListModel.swift */; }; - 85FA24EF29DA908900E5B023 /* ModalVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85FA24EE29DA908900E5B023 /* ModalVC.swift */; }; - 85FA24F129DA909700E5B023 /* TemplateCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85FA24F029DA909700E5B023 /* TemplateCVC.swift */; }; + 85887D862A5CF97E00F7FB21 /* TemplateViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85887D852A5CF97E00F7FB21 /* TemplateViewModel.swift */; }; + 85B5BE862A533BF00057CA2E /* TemplateDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85B5BE852A533BF00057CA2E /* TemplateDetailModel.swift */; }; + 85FA24EF29DA908900E5B023 /* StorageModalVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85FA24EE29DA908900E5B023 /* StorageModalVC.swift */; }; + 85FA24F129DA909700E5B023 /* StorageModalCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85FA24F029DA909700E5B023 /* StorageModalCVC.swift */; }; E7864B4B29D943360006FA18 /* DaminRootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7864B4A29D943360006FA18 /* DaminRootViewController.swift */; }; E7864B4D29D943520006FA18 /* NooriRootViewControllerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7864B4C29D943520006FA18 /* NooriRootViewControllerViewController.swift */; }; E7864B6F29D944030006FA18 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = E7864B6E29D944030006FA18 /* SnapKit */; }; @@ -37,20 +44,26 @@ E7864BC129D948120006FA18 /* Adjusted+.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7864BB329D948120006FA18 /* Adjusted+.swift */; }; E7D31A0929CE017000B8686F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D31A0829CE017000B8686F /* AppDelegate.swift */; }; E7D31A0B29CE017000B8686F /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D31A0A29CE017000B8686F /* SceneDelegate.swift */; }; - E7D31A0D29CE017000B8686F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D31A0C29CE017000B8686F /* ViewController.swift */; }; + E7D31A0D29CE017000B8686F /* TabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E7D31A0C29CE017000B8686F /* TabBarController.swift */; }; E7D31A1229CE017200B8686F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E7D31A1129CE017200B8686F /* Assets.xcassets */; }; E7D31A1529CE017200B8686F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E7D31A1329CE017200B8686F /* LaunchScreen.storyboard */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 85825A0E29DA8FDC00850131 /* WorryVM.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorryVM.swift; sourceTree = ""; }; + 8523A4F22A532E8C00F03A51 /* WriteModalVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WriteModalVC.swift; sourceTree = ""; }; + 8523A4F42A532F7B00F03A51 /* WriteModalCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WriteModalCVC.swift; sourceTree = ""; }; + 854A6B032A52C83F000EBE1C /* WriteVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WriteVC.swift; sourceTree = ""; }; + 854A6B052A52C8F6000EBE1C /* HomeVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeVC.swift; sourceTree = ""; }; + 85825A0E29DA8FDC00850131 /* WorryViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorryViewModel.swift; sourceTree = ""; }; 85825A1229DA901C00850131 /* WorryListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorryListModel.swift; sourceTree = ""; }; 85825A1429DA902A00850131 /* WorryListHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorryListHeaderView.swift; sourceTree = ""; }; - 85825A1629DA903600850131 /* WorryCV.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorryCV.swift; sourceTree = ""; }; - 85825A1829DA904000850131 /* WorryCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorryCVC.swift; sourceTree = ""; }; + 85825A1629DA903600850131 /* StorageVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageVC.swift; sourceTree = ""; }; + 85825A1829DA904000850131 /* StorageCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageCVC.swift; sourceTree = ""; }; 85825A1B29DA905A00850131 /* TemplateListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateListModel.swift; sourceTree = ""; }; - 85FA24EE29DA908900E5B023 /* ModalVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalVC.swift; sourceTree = ""; }; - 85FA24F029DA909700E5B023 /* TemplateCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateCVC.swift; sourceTree = ""; }; + 85887D852A5CF97E00F7FB21 /* TemplateViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateViewModel.swift; sourceTree = ""; }; + 85B5BE852A533BF00057CA2E /* TemplateDetailModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateDetailModel.swift; sourceTree = ""; }; + 85FA24EE29DA908900E5B023 /* StorageModalVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageModalVC.swift; sourceTree = ""; }; + 85FA24F029DA909700E5B023 /* StorageModalCVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageModalCVC.swift; sourceTree = ""; }; E7864B4A29D943360006FA18 /* DaminRootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DaminRootViewController.swift; sourceTree = ""; }; E7864B4C29D943520006FA18 /* NooriRootViewControllerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NooriRootViewControllerViewController.swift; sourceTree = ""; }; E7864BA629D948120006FA18 /* CALayer+.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CALayer+.swift"; sourceTree = ""; }; @@ -70,7 +83,7 @@ E7D31A0529CE017000B8686F /* Hara_Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Hara_Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; E7D31A0829CE017000B8686F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; E7D31A0A29CE017000B8686F /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; - E7D31A0C29CE017000B8686F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + E7D31A0C29CE017000B8686F /* TabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarController.swift; sourceTree = ""; }; E7D31A1129CE017200B8686F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; E7D31A1429CE017200B8686F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; E7D31A1629CE017200B8686F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -83,6 +96,7 @@ files = ( E7864B7229D944290006FA18 /* CombineMoya in Frameworks */, E7864B6F29D944030006FA18 /* SnapKit in Frameworks */, + 854A6B092A52CA75000EBE1C /* SwiftyColor in Frameworks */, E7864B7429D944290006FA18 /* Moya in Frameworks */, E7864B7729D9443A0006FA18 /* Then in Frameworks */, ); @@ -91,31 +105,49 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 8523A4F02A532DB800F03A51 /* Write */ = { + isa = PBXGroup; + children = ( + 8523A4F12A532E7500F03A51 /* Modal */, + 854A6B032A52C83F000EBE1C /* WriteVC.swift */, + ); + path = Write; + sourceTree = ""; + }; + 8523A4F12A532E7500F03A51 /* Modal */ = { + isa = PBXGroup; + children = ( + 8523A4F22A532E8C00F03A51 /* WriteModalVC.swift */, + 8523A4F42A532F7B00F03A51 /* WriteModalCVC.swift */, + ); + path = Modal; + sourceTree = ""; + }; 85825A1029DA8FE100850131 /* ViewModel */ = { isa = PBXGroup; children = ( - 85825A0E29DA8FDC00850131 /* WorryVM.swift */, + 85825A0E29DA8FDC00850131 /* WorryViewModel.swift */, + 85887D852A5CF97E00F7FB21 /* TemplateViewModel.swift */, ); path = ViewModel; sourceTree = ""; }; - 85825A1129DA901000850131 /* Worry */ = { + 85825A1129DA901000850131 /* Storage */ = { isa = PBXGroup; children = ( - 85825A1229DA901C00850131 /* WorryListModel.swift */, + 85825A1A29DA904700850131 /* Modal */, 85825A1429DA902A00850131 /* WorryListHeaderView.swift */, - 85825A1629DA903600850131 /* WorryCV.swift */, - 85825A1829DA904000850131 /* WorryCVC.swift */, + 85825A1629DA903600850131 /* StorageVC.swift */, + 85825A1829DA904000850131 /* StorageCVC.swift */, ); - path = Worry; + path = Storage; sourceTree = ""; }; 85825A1A29DA904700850131 /* Modal */ = { isa = PBXGroup; children = ( - 85825A1B29DA905A00850131 /* TemplateListModel.swift */, - 85FA24EE29DA908900E5B023 /* ModalVC.swift */, - 85FA24F029DA909700E5B023 /* TemplateCVC.swift */, + 85FA24EE29DA908900E5B023 /* StorageModalVC.swift */, + 85FA24F029DA909700E5B023 /* StorageModalCVC.swift */, ); path = Modal; sourceTree = ""; @@ -123,9 +155,13 @@ E7864B4629D942EA0006FA18 /* Sungho */ = { isa = PBXGroup; children = ( - 85825A1A29DA904700850131 /* Modal */, - 85825A1129DA901000850131 /* Worry */, + 85825A1229DA901C00850131 /* WorryListModel.swift */, + 85825A1B29DA905A00850131 /* TemplateListModel.swift */, + 8523A4F02A532DB800F03A51 /* Write */, + 85825A1129DA901000850131 /* Storage */, 85825A1029DA8FE100850131 /* ViewModel */, + 854A6B052A52C8F6000EBE1C /* HomeVC.swift */, + 85B5BE852A533BF00057CA2E /* TemplateDetailModel.swift */, ); path = Sungho; sourceTree = ""; @@ -200,7 +236,7 @@ E7864B4629D942EA0006FA18 /* Sungho */, E7D31A0829CE017000B8686F /* AppDelegate.swift */, E7D31A0A29CE017000B8686F /* SceneDelegate.swift */, - E7D31A0C29CE017000B8686F /* ViewController.swift */, + E7D31A0C29CE017000B8686F /* TabBarController.swift */, E7D31A1129CE017200B8686F /* Assets.xcassets */, E7D31A1329CE017200B8686F /* LaunchScreen.storyboard */, E7D31A1629CE017200B8686F /* Info.plist */, @@ -229,6 +265,7 @@ E7864B7129D944290006FA18 /* CombineMoya */, E7864B7329D944290006FA18 /* Moya */, E7864B7629D9443A0006FA18 /* Then */, + 854A6B082A52CA75000EBE1C /* SwiftyColor */, ); productName = Hara_Demo; productReference = E7D31A0529CE017000B8686F /* Hara_Demo.app */; @@ -262,6 +299,7 @@ E7864B6D29D944030006FA18 /* XCRemoteSwiftPackageReference "SnapKit" */, E7864B7029D944290006FA18 /* XCRemoteSwiftPackageReference "Moya" */, E7864B7529D9443A0006FA18 /* XCRemoteSwiftPackageReference "Then" */, + 854A6B072A52CA75000EBE1C /* XCRemoteSwiftPackageReference "SwiftyColor" */, ); productRefGroup = E7D31A0629CE017000B8686F /* Products */; projectDirPath = ""; @@ -289,7 +327,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 85825A1929DA904000850131 /* WorryCVC.swift in Sources */, + 85825A1929DA904000850131 /* StorageCVC.swift in Sources */, E7864BBB29D948120006FA18 /* UIViewController+.swift in Sources */, E7864BBA29D948120006FA18 /* UIImageView+.swift in Sources */, 85825A1329DA901C00850131 /* WorryListModel.swift in Sources */, @@ -297,16 +335,21 @@ E7864BBE29D948120006FA18 /* UICollectionVIew+.swift in Sources */, E7864BB629D948120006FA18 /* UIFont+.swift in Sources */, E7864B4D29D943520006FA18 /* NooriRootViewControllerViewController.swift in Sources */, + 854A6B042A52C83F000EBE1C /* WriteVC.swift in Sources */, E7864BB729D948120006FA18 /* UIView+.swift in Sources */, E7864B4B29D943360006FA18 /* DaminRootViewController.swift in Sources */, - E7D31A0D29CE017000B8686F /* ViewController.swift in Sources */, + 8523A4F52A532F7B00F03A51 /* WriteModalCVC.swift in Sources */, + E7D31A0D29CE017000B8686F /* TabBarController.swift in Sources */, E7864BB929D948120006FA18 /* UIStackView+.swift in Sources */, - 85FA24F129DA909700E5B023 /* TemplateCVC.swift in Sources */, + 85FA24F129DA909700E5B023 /* StorageModalCVC.swift in Sources */, E7864BB829D948120006FA18 /* String+.swift in Sources */, 85825A1C29DA905A00850131 /* TemplateListModel.swift in Sources */, + 8523A4F32A532E8C00F03A51 /* WriteModalVC.swift in Sources */, E7864BB529D948120006FA18 /* NSObject+.swift in Sources */, - 85825A0F29DA8FDC00850131 /* WorryVM.swift in Sources */, - 85FA24EF29DA908900E5B023 /* ModalVC.swift in Sources */, + 85825A0F29DA8FDC00850131 /* WorryViewModel.swift in Sources */, + 85887D862A5CF97E00F7FB21 /* TemplateViewModel.swift in Sources */, + 85B5BE862A533BF00057CA2E /* TemplateDetailModel.swift in Sources */, + 85FA24EF29DA908900E5B023 /* StorageModalVC.swift in Sources */, E7864BC129D948120006FA18 /* Adjusted+.swift in Sources */, 85825A1529DA902A00850131 /* WorryListHeaderView.swift in Sources */, E7864BBC29D948120006FA18 /* UILabel+.swift in Sources */, @@ -315,7 +358,8 @@ E7864BBF29D948120006FA18 /* UITextField+.swift in Sources */, E7D31A0B29CE017000B8686F /* SceneDelegate.swift in Sources */, E7864BBD29D948120006FA18 /* UIButton+.swift in Sources */, - 85825A1729DA903600850131 /* WorryCV.swift in Sources */, + 85825A1729DA903600850131 /* StorageVC.swift in Sources */, + 854A6B062A52C8F6000EBE1C /* HomeVC.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -527,6 +571,14 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ + 854A6B072A52CA75000EBE1C /* XCRemoteSwiftPackageReference "SwiftyColor" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/devxoul/SwiftyColor"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.0.0; + }; + }; E7864B6D29D944030006FA18 /* XCRemoteSwiftPackageReference "SnapKit" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/SnapKit/SnapKit.git"; @@ -554,6 +606,11 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ + 854A6B082A52CA75000EBE1C /* SwiftyColor */ = { + isa = XCSwiftPackageProductDependency; + package = 854A6B072A52CA75000EBE1C /* XCRemoteSwiftPackageReference "SwiftyColor" */; + productName = SwiftyColor; + }; E7864B6E29D944030006FA18 /* SnapKit */ = { isa = XCSwiftPackageProductDependency; package = E7864B6D29D944030006FA18 /* XCRemoteSwiftPackageReference "SnapKit" */; diff --git a/Hara_Demo/Hara_Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Hara_Demo/Hara_Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 267b627..f218700 100644 --- a/Hara_Demo/Hara_Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Hara_Demo/Hara_Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/Alamofire/Alamofire.git", "state" : { - "revision" : "78424be314842833c04bc3bef5b72e85fff99204", - "version" : "5.6.4" + "revision" : "bc268c28fb170f494de9e9927c371b8342979ece", + "version" : "5.7.1" } }, { @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/ReactiveX/RxSwift.git", "state" : { - "revision" : "b4307ba0b6425c0ba4178e138799946c3da594f8", - "version" : "6.5.0" + "revision" : "9dcaa4b333db437b0fbfaf453fad29069044a8b4", + "version" : "6.6.0" } }, { @@ -45,6 +45,15 @@ "version" : "5.6.0" } }, + { + "identity" : "swiftycolor", + "kind" : "remoteSourceControl", + "location" : "https://github.com/devxoul/SwiftyColor", + "state" : { + "revision" : "4b169b77446ef1d9878b162a0a38258f7563ed5b", + "version" : "1.2.1" + } + }, { "identity" : "then", "kind" : "remoteSourceControl", diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/Close.imageset/Close.png b/Hara_Demo/Hara_Demo/Assets.xcassets/Close.imageset/Close.png new file mode 100644 index 0000000..3173885 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/Close.imageset/Close.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/Close.imageset/Close@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/Close.imageset/Close@2x.png new file mode 100644 index 0000000..b3f7d10 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/Close.imageset/Close@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/Close.imageset/Close@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/Close.imageset/Close@3x.png new file mode 100644 index 0000000..04fbf39 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/Close.imageset/Close@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/Close.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/Close.imageset/Contents.json new file mode 100644 index 0000000..caa579b --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/Close.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Close.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Close@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Close@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/div_line.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/div_line.imageset/Contents.json new file mode 100644 index 0000000..ec38670 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/div_line.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "div_line.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "div_line@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "div_line@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/div_line.imageset/div_line.png b/Hara_Demo/Hara_Demo/Assets.xcassets/div_line.imageset/div_line.png new file mode 100644 index 0000000..554358a Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/div_line.imageset/div_line.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/div_line.imageset/div_line@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/div_line.imageset/div_line@2x.png new file mode 100644 index 0000000..298913d Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/div_line.imageset/div_line@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/div_line.imageset/div_line@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/div_line.imageset/div_line@3x.png new file mode 100644 index 0000000..fa188e9 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/div_line.imageset/div_line@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/framebg.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/framebg.imageset/Contents.json new file mode 100644 index 0000000..2728a3f --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/framebg.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "framebg.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "framebg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "framebg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/framebg.imageset/framebg.png b/Hara_Demo/Hara_Demo/Assets.xcassets/framebg.imageset/framebg.png new file mode 100644 index 0000000..23d8c8a Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/framebg.imageset/framebg.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/framebg.imageset/framebg@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/framebg.imageset/framebg@2x.png new file mode 100644 index 0000000..d034d3a Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/framebg.imageset/framebg@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/framebg.imageset/framebg@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/framebg.imageset/framebg@3x.png new file mode 100644 index 0000000..85f01d7 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/framebg.imageset/framebg@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_m.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_m.imageset/Contents.json new file mode 100644 index 0000000..b877e44 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_m.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_blue_m.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_blue_m@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_blue_m@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_m.imageset/gem_blue_m.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_m.imageset/gem_blue_m.png new file mode 100644 index 0000000..7a4c9d2 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_m.imageset/gem_blue_m.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_m.imageset/gem_blue_m@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_m.imageset/gem_blue_m@2x.png new file mode 100644 index 0000000..2b226d6 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_m.imageset/gem_blue_m@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_m.imageset/gem_blue_m@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_m.imageset/gem_blue_m@3x.png new file mode 100644 index 0000000..0f9996d Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_m.imageset/gem_blue_m@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_off.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_off.imageset/Contents.json new file mode 100644 index 0000000..d02d369 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_off.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_blue__off.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_blue__off@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_blue__off@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_off.imageset/gem_blue__off.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_off.imageset/gem_blue__off.png new file mode 100644 index 0000000..2b321d4 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_off.imageset/gem_blue__off.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_off.imageset/gem_blue__off@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_off.imageset/gem_blue__off@2x.png new file mode 100644 index 0000000..26969e7 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_off.imageset/gem_blue__off@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_off.imageset/gem_blue__off@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_off.imageset/gem_blue__off@3x.png new file mode 100644 index 0000000..8e72653 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_off.imageset/gem_blue__off@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_on.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_on.imageset/Contents.json new file mode 100644 index 0000000..2e49544 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_on.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_blue__on.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_blue__on@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_blue__on@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_on.imageset/gem_blue__on.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_on.imageset/gem_blue__on.png new file mode 100644 index 0000000..99b0e06 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_on.imageset/gem_blue__on.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_on.imageset/gem_blue__on@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_on.imageset/gem_blue__on@2x.png new file mode 100644 index 0000000..667972a Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_on.imageset/gem_blue__on@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_on.imageset/gem_blue__on@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_on.imageset/gem_blue__on@3x.png new file mode 100644 index 0000000..04065aa Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_blue_s_on.imageset/gem_blue__on@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_green_s_on.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_green_s_on.imageset/Contents.json new file mode 100644 index 0000000..2e7aee8 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_green_s_on.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_green_s_on.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_green_s_on@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_green_s_on@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_green_s_on.imageset/gem_green_s_on.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_green_s_on.imageset/gem_green_s_on.png new file mode 100644 index 0000000..8aac670 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_green_s_on.imageset/gem_green_s_on.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_green_s_on.imageset/gem_green_s_on@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_green_s_on.imageset/gem_green_s_on@2x.png new file mode 100644 index 0000000..bf8cd8a Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_green_s_on.imageset/gem_green_s_on@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_green_s_on.imageset/gem_green_s_on@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_green_s_on.imageset/gem_green_s_on@3x.png new file mode 100644 index 0000000..328bbaf Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_green_s_on.imageset/gem_green_s_on@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_m.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_m.imageset/Contents.json new file mode 100644 index 0000000..337198a --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_m.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_orange_m.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_orange_m@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_orange_m@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_m.imageset/gem_orange_m.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_m.imageset/gem_orange_m.png new file mode 100644 index 0000000..642de28 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_m.imageset/gem_orange_m.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_m.imageset/gem_orange_m@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_m.imageset/gem_orange_m@2x.png new file mode 100644 index 0000000..789e664 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_m.imageset/gem_orange_m@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_m.imageset/gem_orange_m@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_m.imageset/gem_orange_m@3x.png new file mode 100644 index 0000000..87b4ec6 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_m.imageset/gem_orange_m@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_off.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_off.imageset/Contents.json new file mode 100644 index 0000000..40e5eed --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_off.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_orange_s_off.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_orange_s_off@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_orange_s_off@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_off.imageset/gem_orange_s_off.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_off.imageset/gem_orange_s_off.png new file mode 100644 index 0000000..f1a5715 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_off.imageset/gem_orange_s_off.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_off.imageset/gem_orange_s_off@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_off.imageset/gem_orange_s_off@2x.png new file mode 100644 index 0000000..de7f16e Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_off.imageset/gem_orange_s_off@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_off.imageset/gem_orange_s_off@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_off.imageset/gem_orange_s_off@3x.png new file mode 100644 index 0000000..326e063 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_off.imageset/gem_orange_s_off@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_on.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_on.imageset/Contents.json new file mode 100644 index 0000000..d0afe3a --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_on.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_orange_s_on.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_orange_s_on@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_orange_s_on@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_on.imageset/gem_orange_s_on.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_on.imageset/gem_orange_s_on.png new file mode 100644 index 0000000..376fca1 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_on.imageset/gem_orange_s_on.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_on.imageset/gem_orange_s_on@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_on.imageset/gem_orange_s_on@2x.png new file mode 100644 index 0000000..27563ea Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_on.imageset/gem_orange_s_on@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_on.imageset/gem_orange_s_on@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_on.imageset/gem_orange_s_on@3x.png new file mode 100644 index 0000000..581eb58 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_orange_s_on.imageset/gem_orange_s_on@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_m.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_m.imageset/Contents.json new file mode 100644 index 0000000..df208f0 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_m.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_pink_m.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_pink_m@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_pink_m@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_m.imageset/gem_pink_m.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_m.imageset/gem_pink_m.png new file mode 100644 index 0000000..66df624 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_m.imageset/gem_pink_m.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_m.imageset/gem_pink_m@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_m.imageset/gem_pink_m@2x.png new file mode 100644 index 0000000..48454d8 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_m.imageset/gem_pink_m@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_m.imageset/gem_pink_m@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_m.imageset/gem_pink_m@3x.png new file mode 100644 index 0000000..6892894 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_m.imageset/gem_pink_m@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_off.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_off.imageset/Contents.json new file mode 100644 index 0000000..619886a --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_off.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_pink_s_off.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_pink_s_off@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_pink_s_off@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_off.imageset/gem_pink_s_off.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_off.imageset/gem_pink_s_off.png new file mode 100644 index 0000000..677e0ad Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_off.imageset/gem_pink_s_off.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_off.imageset/gem_pink_s_off@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_off.imageset/gem_pink_s_off@2x.png new file mode 100644 index 0000000..184fb55 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_off.imageset/gem_pink_s_off@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_off.imageset/gem_pink_s_off@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_off.imageset/gem_pink_s_off@3x.png new file mode 100644 index 0000000..0facfac Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_off.imageset/gem_pink_s_off@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_on.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_on.imageset/Contents.json new file mode 100644 index 0000000..b9a5d65 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_on.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_pink_s_on.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_pink_s_on@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_pink_s_on@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_on.imageset/gem_pink_s_on.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_on.imageset/gem_pink_s_on.png new file mode 100644 index 0000000..0856abe Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_on.imageset/gem_pink_s_on.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_on.imageset/gem_pink_s_on@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_on.imageset/gem_pink_s_on@2x.png new file mode 100644 index 0000000..47788a6 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_on.imageset/gem_pink_s_on@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_on.imageset/gem_pink_s_on@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_on.imageset/gem_pink_s_on@3x.png new file mode 100644 index 0000000..b7b5cbc Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_pink_s_on.imageset/gem_pink_s_on@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_m.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_m.imageset/Contents.json new file mode 100644 index 0000000..2f121e4 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_m.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_red_m.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_red_m@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_red_m@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_m.imageset/gem_red_m.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_m.imageset/gem_red_m.png new file mode 100644 index 0000000..4893c82 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_m.imageset/gem_red_m.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_m.imageset/gem_red_m@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_m.imageset/gem_red_m@2x.png new file mode 100644 index 0000000..44e9c61 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_m.imageset/gem_red_m@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_m.imageset/gem_red_m@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_m.imageset/gem_red_m@3x.png new file mode 100644 index 0000000..9e232b4 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_m.imageset/gem_red_m@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_off.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_off.imageset/Contents.json new file mode 100644 index 0000000..8fc9db2 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_off.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_red_s_off.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_red_s_off@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_red_s_off@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_off.imageset/gem_red_s_off.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_off.imageset/gem_red_s_off.png new file mode 100644 index 0000000..e9c183c Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_off.imageset/gem_red_s_off.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_off.imageset/gem_red_s_off@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_off.imageset/gem_red_s_off@2x.png new file mode 100644 index 0000000..0828c28 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_off.imageset/gem_red_s_off@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_off.imageset/gem_red_s_off@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_off.imageset/gem_red_s_off@3x.png new file mode 100644 index 0000000..66492d5 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_off.imageset/gem_red_s_off@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_on.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_on.imageset/Contents.json new file mode 100644 index 0000000..d7ee47e --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_on.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_red_s_on.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_red_s_on@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_red_s_on@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_on.imageset/gem_red_s_on.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_on.imageset/gem_red_s_on.png new file mode 100644 index 0000000..7a24a69 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_on.imageset/gem_red_s_on.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_on.imageset/gem_red_s_on@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_on.imageset/gem_red_s_on@2x.png new file mode 100644 index 0000000..d56f76f Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_on.imageset/gem_red_s_on@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_on.imageset/gem_red_s_on@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_on.imageset/gem_red_s_on@3x.png new file mode 100644 index 0000000..97dc42f Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_red_s_on.imageset/gem_red_s_on@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_m.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_m.imageset/Contents.json new file mode 100644 index 0000000..9e5c95d --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_m.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_yellow_m.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_yellow_m@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_yellow_m@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_m.imageset/gem_yellow_m.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_m.imageset/gem_yellow_m.png new file mode 100644 index 0000000..b8e2a5f Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_m.imageset/gem_yellow_m.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_m.imageset/gem_yellow_m@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_m.imageset/gem_yellow_m@2x.png new file mode 100644 index 0000000..35b5064 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_m.imageset/gem_yellow_m@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_m.imageset/gem_yellow_m@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_m.imageset/gem_yellow_m@3x.png new file mode 100644 index 0000000..a8ddbb8 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_m.imageset/gem_yellow_m@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_off.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_off.imageset/Contents.json new file mode 100644 index 0000000..f619280 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_off.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_yellow_s_off.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_yellow_s_off@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_yellow_s_off@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_off.imageset/gem_yellow_s_off.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_off.imageset/gem_yellow_s_off.png new file mode 100644 index 0000000..a7fa0d3 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_off.imageset/gem_yellow_s_off.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_off.imageset/gem_yellow_s_off@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_off.imageset/gem_yellow_s_off@2x.png new file mode 100644 index 0000000..ce1190e Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_off.imageset/gem_yellow_s_off@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_off.imageset/gem_yellow_s_off@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_off.imageset/gem_yellow_s_off@3x.png new file mode 100644 index 0000000..3397500 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_off.imageset/gem_yellow_s_off@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_on.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_on.imageset/Contents.json new file mode 100644 index 0000000..63be151 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_on.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gem_yellow_s_on.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gem_yellow_s_on@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gem_yellow_s_on@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_on.imageset/gem_yellow_s_on.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_on.imageset/gem_yellow_s_on.png new file mode 100644 index 0000000..3e53ca9 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_on.imageset/gem_yellow_s_on.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_on.imageset/gem_yellow_s_on@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_on.imageset/gem_yellow_s_on@2x.png new file mode 100644 index 0000000..2f3dca4 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_on.imageset/gem_yellow_s_on@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_on.imageset/gem_yellow_s_on@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_on.imageset/gem_yellow_s_on@3x.png new file mode 100644 index 0000000..7287712 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gem_yellow_s_on.imageset/gem_yellow_s_on@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_m.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_m.imageset/Contents.json new file mode 100644 index 0000000..07a476b --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_m.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gemstone_green_m.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gemstone_green_m@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gemstone_green_m@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_m.imageset/gemstone_green_m.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_m.imageset/gemstone_green_m.png new file mode 100644 index 0000000..1b1a3f5 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_m.imageset/gemstone_green_m.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_m.imageset/gemstone_green_m@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_m.imageset/gemstone_green_m@2x.png new file mode 100644 index 0000000..1072436 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_m.imageset/gemstone_green_m@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_m.imageset/gemstone_green_m@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_m.imageset/gemstone_green_m@3x.png new file mode 100644 index 0000000..a2d5d42 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_m.imageset/gemstone_green_m@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_s_off.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_s_off.imageset/Contents.json new file mode 100644 index 0000000..48b8794 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_s_off.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "gemstone_green_s_off.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "gemstone_green_s_off@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "gemstone_green_s_off@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_s_off.imageset/gemstone_green_s_off.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_s_off.imageset/gemstone_green_s_off.png new file mode 100644 index 0000000..905d792 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_s_off.imageset/gemstone_green_s_off.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_s_off.imageset/gemstone_green_s_off@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_s_off.imageset/gemstone_green_s_off@2x.png new file mode 100644 index 0000000..b0d9aa5 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_s_off.imageset/gemstone_green_s_off@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_s_off.imageset/gemstone_green_s_off@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_s_off.imageset/gemstone_green_s_off@3x.png new file mode 100644 index 0000000..2da4962 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/gemstone_green_s_off.imageset/gemstone_green_s_off@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_back.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_back.imageset/Contents.json new file mode 100644 index 0000000..50aad1f --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_back.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icn_back.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icn_back@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icn_back@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_back.imageset/icn_back.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_back.imageset/icn_back.png new file mode 100644 index 0000000..2192e6e Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_back.imageset/icn_back.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_back.imageset/icn_back@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_back.imageset/icn_back@2x.png new file mode 100644 index 0000000..3948715 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_back.imageset/icn_back@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_back.imageset/icn_back@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_back.imageset/icn_back@3x.png new file mode 100644 index 0000000..5c3769e Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_back.imageset/icn_back@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_check.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_check.imageset/Contents.json new file mode 100644 index 0000000..b303651 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_check.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icn_check.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icn_check@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icn_check@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_check.imageset/icn_check.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_check.imageset/icn_check.png new file mode 100644 index 0000000..c049cb8 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_check.imageset/icn_check.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_check.imageset/icn_check@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_check.imageset/icn_check@2x.png new file mode 100644 index 0000000..53bf6f5 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_check.imageset/icn_check@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_check.imageset/icn_check@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_check.imageset/icn_check@3x.png new file mode 100644 index 0000000..ae17588 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_check.imageset/icn_check@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_drop_down.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_drop_down.imageset/Contents.json new file mode 100644 index 0000000..46a39e6 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_drop_down.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icn_drop_down.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icn_drop_down@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icn_drop_down@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_drop_down.imageset/icn_drop_down.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_drop_down.imageset/icn_drop_down.png new file mode 100644 index 0000000..8454c4c Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_drop_down.imageset/icn_drop_down.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_drop_down.imageset/icn_drop_down@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_drop_down.imageset/icn_drop_down@2x.png new file mode 100644 index 0000000..af794e8 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_drop_down.imageset/icn_drop_down@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_drop_down.imageset/icn_drop_down@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_drop_down.imageset/icn_drop_down@3x.png new file mode 100644 index 0000000..e7c6c67 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_drop_down.imageset/icn_drop_down@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_off.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_off.imageset/Contents.json new file mode 100644 index 0000000..357f54b --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_off.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icn_home_off.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icn_home_off@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icn_home_off@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_off.imageset/icn_home_off.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_off.imageset/icn_home_off.png new file mode 100644 index 0000000..06a8c15 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_off.imageset/icn_home_off.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_off.imageset/icn_home_off@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_off.imageset/icn_home_off@2x.png new file mode 100644 index 0000000..6184e3d Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_off.imageset/icn_home_off@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_off.imageset/icn_home_off@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_off.imageset/icn_home_off@3x.png new file mode 100644 index 0000000..40f0890 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_off.imageset/icn_home_off@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_on.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_on.imageset/Contents.json new file mode 100644 index 0000000..243dc39 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_on.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icn_home_on.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icn_home_on@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icn_home_on@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_on.imageset/icn_home_on.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_on.imageset/icn_home_on.png new file mode 100644 index 0000000..a987700 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_on.imageset/icn_home_on.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_on.imageset/icn_home_on@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_on.imageset/icn_home_on@2x.png new file mode 100644 index 0000000..680f095 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_on.imageset/icn_home_on@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_on.imageset/icn_home_on@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_on.imageset/icn_home_on@3x.png new file mode 100644 index 0000000..2da62b2 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_home_on.imageset/icn_home_on@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_off.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_off.imageset/Contents.json new file mode 100644 index 0000000..a88f2ea --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_off.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icn_storage_off.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icn_storage_off@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icn_storage_off@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_off.imageset/icn_storage_off.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_off.imageset/icn_storage_off.png new file mode 100644 index 0000000..50e1f95 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_off.imageset/icn_storage_off.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_off.imageset/icn_storage_off@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_off.imageset/icn_storage_off@2x.png new file mode 100644 index 0000000..0eb6647 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_off.imageset/icn_storage_off@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_off.imageset/icn_storage_off@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_off.imageset/icn_storage_off@3x.png new file mode 100644 index 0000000..611a63a Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_off.imageset/icn_storage_off@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_on.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_on.imageset/Contents.json new file mode 100644 index 0000000..2e9b68d --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_on.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icn_storage_on.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icn_storage_on@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icn_storage_on@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_on.imageset/icn_storage_on.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_on.imageset/icn_storage_on.png new file mode 100644 index 0000000..3e8c3b3 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_on.imageset/icn_storage_on.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_on.imageset/icn_storage_on@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_on.imageset/icn_storage_on@2x.png new file mode 100644 index 0000000..fac2cc9 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_on.imageset/icn_storage_on@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_on.imageset/icn_storage_on@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_on.imageset/icn_storage_on@3x.png new file mode 100644 index 0000000..daa7650 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_storage_on.imageset/icn_storage_on@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_write.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_write.imageset/Contents.json new file mode 100644 index 0000000..69850ad --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_write.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icn_write.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icn_write@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icn_write@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_write.imageset/icn_write.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_write.imageset/icn_write.png new file mode 100644 index 0000000..2bc946f Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_write.imageset/icn_write.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_write.imageset/icn_write@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_write.imageset/icn_write@2x.png new file mode 100644 index 0000000..dc4e18b Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_write.imageset/icn_write@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/icn_write.imageset/icn_write@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_write.imageset/icn_write@3x.png new file mode 100644 index 0000000..d988697 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/icn_write.imageset/icn_write@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/no_template.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/no_template.imageset/Contents.json new file mode 100644 index 0000000..a76f595 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/no_template.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "no_template.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "no_template@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "no_template@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/no_template.imageset/no_template.png b/Hara_Demo/Hara_Demo/Assets.xcassets/no_template.imageset/no_template.png new file mode 100644 index 0000000..dab8663 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/no_template.imageset/no_template.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/no_template.imageset/no_template@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/no_template.imageset/no_template@2x.png new file mode 100644 index 0000000..28b323c Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/no_template.imageset/no_template@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/no_template.imageset/no_template@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/no_template.imageset/no_template@3x.png new file mode 100644 index 0000000..3c73789 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/no_template.imageset/no_template@3x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/toggle_down.imageset/Contents.json b/Hara_Demo/Hara_Demo/Assets.xcassets/toggle_down.imageset/Contents.json new file mode 100644 index 0000000..7e1f356 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Assets.xcassets/toggle_down.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "toggle_down.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "toggle_down@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "toggle_down@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/toggle_down.imageset/toggle_down.png b/Hara_Demo/Hara_Demo/Assets.xcassets/toggle_down.imageset/toggle_down.png new file mode 100644 index 0000000..6ac6e92 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/toggle_down.imageset/toggle_down.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/toggle_down.imageset/toggle_down@2x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/toggle_down.imageset/toggle_down@2x.png new file mode 100644 index 0000000..9bfc53e Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/toggle_down.imageset/toggle_down@2x.png differ diff --git a/Hara_Demo/Hara_Demo/Assets.xcassets/toggle_down.imageset/toggle_down@3x.png b/Hara_Demo/Hara_Demo/Assets.xcassets/toggle_down.imageset/toggle_down@3x.png new file mode 100644 index 0000000..51d6e58 Binary files /dev/null and b/Hara_Demo/Hara_Demo/Assets.xcassets/toggle_down.imageset/toggle_down@3x.png differ diff --git a/Hara_Demo/Hara_Demo/SceneDelegate.swift b/Hara_Demo/Hara_Demo/SceneDelegate.swift index c62fc27..9d3b775 100644 --- a/Hara_Demo/Hara_Demo/SceneDelegate.swift +++ b/Hara_Demo/Hara_Demo/SceneDelegate.swift @@ -13,7 +13,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let windowScene = (scene as? UIWindowScene) else { return } window = UIWindow(windowScene: windowScene) - window?.rootViewController = WorryCV() + window?.rootViewController = TabBarController() window?.makeKeyAndVisible() } diff --git a/Hara_Demo/Hara_Demo/Sungho/HomeVC.swift b/Hara_Demo/Hara_Demo/Sungho/HomeVC.swift new file mode 100644 index 0000000..c0fcd9d --- /dev/null +++ b/Hara_Demo/Hara_Demo/Sungho/HomeVC.swift @@ -0,0 +1,29 @@ +// +// homeVC.swift +// Hara_Demo +// +// Created by saint on 2023/07/03. +// + +import UIKit + +class HomeVC: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .blue//0x1E2227.color + // 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/Hara_Demo/Hara_Demo/Sungho/Modal/TemplateListModel.swift b/Hara_Demo/Hara_Demo/Sungho/Modal/TemplateListModel.swift deleted file mode 100644 index 88418ce..0000000 --- a/Hara_Demo/Hara_Demo/Sungho/Modal/TemplateListModel.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// TemplateListModel.swift -// MVVM-HARA -// -// Created by saint on 2023/04/01. -// - -import Foundation - -struct TemplateListModel{ - let templateId: Int - let templateTitle: String - let templateDetail: String -} diff --git a/Hara_Demo/Hara_Demo/Sungho/Storage/Modal/StorageModalCVC.swift b/Hara_Demo/Hara_Demo/Sungho/Storage/Modal/StorageModalCVC.swift new file mode 100644 index 0000000..1efcd36 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Sungho/Storage/Modal/StorageModalCVC.swift @@ -0,0 +1,125 @@ +// +// ModalCVC.swift +// MVVM-HARA +// +// Created by saint on 2023/04/01. +// + +import UIKit +import SnapKit +import Then + +class StorageModalCVC: UICollectionViewCell { + + let templateCell = UIView().then{ + $0.backgroundColor = .clear + $0.layer.cornerRadius = 8 + $0.layer.borderWidth = 1 + $0.layer.borderColor = UIColor.systemGray.cgColor + } + + private let templateImage = UIImageView().then{ + $0.image = UIImage(named: "jewel") + $0.backgroundColor = .clear + } + + private let templateTitle = UILabel().then{ + $0.font = .systemFont(ofSize: 14, weight: .medium) + $0.textColor = .white + } + + private let templateDetail = UILabel().then{ + $0.font = .systemFont(ofSize: 12, weight: .light) + $0.textColor = 0x93A0AC.color + } + + let checkIcon = UIImageView().then{ + $0.image = UIImage(named: "icn_check") + $0.backgroundColor = .clear + $0.isHidden = true + } + + override init(frame: CGRect) { + super.init(frame: frame) + setLayout() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} + +extension StorageModalCVC{ + + // MARK: - Layout + private func setLayout() { + backgroundColor = .clear + contentView.backgroundColor = .clear + contentView.addSubview(templateCell) + + templateCell.snp.makeConstraints{ + $0.edges.equalToSuperview() + } + + templateCell.addSubviews([templateImage, templateTitle, templateDetail, checkIcon]) + + templateImage.snp.makeConstraints{ + $0.width.height.equalTo(46.adjustedW) + $0.leading.equalToSuperview().offset(10.adjustedW) + $0.centerY.equalToSuperview() + } + + templateTitle.snp.makeConstraints{ + $0.leading.equalTo(templateImage.snp.trailing).offset(8.adjustedW) + $0.top.equalToSuperview().offset(19.adjustedW) + } + + templateDetail.snp.makeConstraints{ + $0.leading.equalTo(templateTitle.snp.leading) + $0.top.equalTo(templateTitle.snp.bottom).offset(4.adjustedW) + } + + checkIcon.snp.makeConstraints{ + $0.centerY.equalToSuperview() + $0.trailing.equalToSuperview().offset(-20.adjustedW) + $0.width.height.equalTo(26.adjustedW) + } + } + + func dataBind(model: TemplateListPublisherModel, indexPath: IndexPath) { + templateImage.image = model.image + templateTitle.text = model.templateTitle + templateDetail.text = model.templateDetail + + if indexPath.row == 0 { + // 보석 이미지를 숨김 + templateImage.isHidden = true + + // 제목과 상세설명을 왼쪽으로 이동 + templateTitle.snp.remakeConstraints { + $0.leading.equalToSuperview().offset(14.adjustedW) + $0.top.equalToSuperview().offset(19.adjustedW) + } + + templateDetail.snp.remakeConstraints { + $0.leading.equalToSuperview().offset(14.adjustedW) + $0.top.equalTo(templateTitle.snp.bottom).offset(4.adjustedW) + } + } else { + // 보석 이미지를 보이게 함 + templateImage.isHidden = false + + // 제목과 상세설명의 위치를 원래대로 되돌림 + templateTitle.snp.remakeConstraints { + $0.leading.equalTo(templateImage.snp.trailing).offset(8.adjustedW) + $0.top.equalToSuperview().offset(19.adjustedW) + } + + templateDetail.snp.remakeConstraints { + $0.leading.equalTo(templateTitle.snp.leading) + $0.top.equalTo(templateTitle.snp.bottom).offset(4.adjustedW) + } + } + } +} + diff --git a/Hara_Demo/Hara_Demo/Sungho/Modal/ModalVC.swift b/Hara_Demo/Hara_Demo/Sungho/Storage/Modal/StorageModalVC.swift similarity index 60% rename from Hara_Demo/Hara_Demo/Sungho/Modal/ModalVC.swift rename to Hara_Demo/Hara_Demo/Sungho/Storage/Modal/StorageModalVC.swift index f5e5057..e9d52ec 100644 --- a/Hara_Demo/Hara_Demo/Sungho/Modal/ModalVC.swift +++ b/Hara_Demo/Hara_Demo/Sungho/Storage/Modal/StorageModalVC.swift @@ -11,21 +11,21 @@ import Then import Combine protocol RefreshListDelegate: AnyObject { - func refreshList(list: [WorryListModel]) + func refreshList(templateTitle: String, list: [WorryListPublisherModel]) } - -class ModalVC: UIViewController { +class StorageModalVC: UIViewController { // MARK: - Properties - var worryVM: WorryVM = WorryVM() + var templateVM: TemplateViewModel = TemplateViewModel() + var worryVM: WorryViewModel = WorryViewModel() - var templateList: [TemplateListModel] = [] + var templateList: [TemplateListPublisherModel] = [] /// 데이터를 전달하기 위한 클로저 선언 - var completionHandler: (([WorryListModel]) -> [WorryListModel])? + var completionHandler: (([WorryListPublisherModel]) -> [WorryListPublisherModel])? /// category에 맞는 컬렉션뷰를 화면에 보여주기 위한 배열 - var templateWithCategory: [WorryListModel] = [] + var templateWithCategory: [WorryListPublisherModel] = [] var disposalbleBag = Set() weak var refreshListDelegate: RefreshListDelegate? @@ -44,9 +44,9 @@ class ModalVC: UIViewController { view.dataSource = self return view }() - + // MARK: - Constants - final let templateListInset: UIEdgeInsets = UIEdgeInsets(top: 30, left: 16.adjustedW, bottom: 20, right: 16.adjustedW) + final let templateListInset: UIEdgeInsets = UIEdgeInsets(top: 30, left: 12.adjustedW, bottom: 20, right: 12.adjustedW) final let lineSpacing: CGFloat = 8 // MARK: - Life Cycles @@ -65,16 +65,16 @@ class ModalVC: UIViewController { // MARK: - Functions private func registerCV() { - templateListCV.register(TemplateCVC.self, - forCellWithReuseIdentifier: TemplateCVC.classIdentifier) + templateListCV.register(StorageModalCVC.self, + forCellWithReuseIdentifier: StorageModalCVC.classIdentifier) } } // MARK: - Layout -extension ModalVC{ +extension StorageModalVC{ private func setLayout(){ - view.backgroundColor = .white + view.backgroundColor = 0x1E2227.color view.addSubview(templateListCV) templateListCV.snp.makeConstraints{ @@ -86,23 +86,23 @@ extension ModalVC{ // MARK: - 뷰모델 관련 -extension ModalVC{ +extension StorageModalVC{ /// 뷰모델의 데이터를 뷰컨의 리스트 데이터와 연동 fileprivate func setBindings(){ print("ViewController - setBindings()") - self.worryVM.$templateList.sink{ (updatedList : [TemplateListModel]) in + self.templateVM.templateListPublisher.sink{ [weak self] (updatedList : [TemplateListPublisherModel]) in print("ViewController - updatedList.count: \(updatedList.count)") - self.templateList = updatedList + self?.templateList = updatedList }.store(in: &disposalbleBag) } } // MARK: - UICollectionDelegate -extension ModalVC: UICollectionViewDelegateFlowLayout { +extension StorageModalVC: UICollectionViewDelegateFlowLayout { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { - return CGSize(width: 345.adjustedW, height: 70.adjustedW) + return CGSize(width: 352.adjustedW, height: 72.adjustedW) } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { @@ -117,41 +117,57 @@ extension ModalVC: UICollectionViewDelegateFlowLayout { func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { print("click index=\(indexPath.row)") + // 기존의 선택되었던 Cell의 디자인을 초기화한다. + if let previousCell = collectionView.cellForItem(at: IndexPath(row: templateIndex, section: 0)) as? StorageModalCVC { + previousCell.templateCell.layer.borderColor = UIColor.systemGray.cgColor + previousCell.checkIcon.isHidden = true + } + + // 새롭게 선택된 Cell의 디자인을 변경한다. + if let currentCell = collectionView.cellForItem(at: indexPath) as? StorageModalCVC { + currentCell.templateCell.layer.borderColor = 0xF6CE66.color.cgColor + currentCell.checkIcon.isHidden = false + } + templateWithCategory = [] templateIndex = indexPath.row - /// worryList의 templateId와 같은 고민을 화면에 띄어줍니다. - for i in 0...worryVM.worryList.count-1{ - if templateIndex == worryVM.worryList[i].templateId{ - templateWithCategory.append(worryVM.worryList[i]) - } - } /// 0. 전체 템플릿 보기를 클릭 시에는 모든 고민을 화면에 띄어줍니다. if templateIndex == 0 { - templateWithCategory = worryVM.worryList + templateWithCategory = worryVM.worryListPublisher.value + } + + else { + /// worryList의 templateId와 같은 고민을 화면에 띄어줍니다. + for i in 0...worryVM.worryListPublisher.value.count-1{ + if templateIndex == worryVM.worryListPublisher.value[i].templateId{ + templateWithCategory.append(worryVM.worryListPublisher.value[i]) + } + } } + print("templateIndex=\(templateIndex)") self.dismiss(animated: true, completion: nil) /// category에 해당하는 고민들을 담은 리스트를 worryCV로 보내주어, WorryVM의 List를 변경할 수 있게 해줍니다. - refreshListDelegate?.refreshList(list: templateWithCategory) + refreshListDelegate?.refreshList(templateTitle: templateVM.templateListPublisher.value[templateIndex].templateTitle, list: templateWithCategory) print("send the array=\(templateWithCategory)") } } // MARK: - UICollectionViewDataSource -extension ModalVC: UICollectionViewDataSource { +extension StorageModalVC: UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return templateList.count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { guard let cell = collectionView.dequeueReusableCell( - withReuseIdentifier: TemplateCVC.classIdentifier, for: indexPath) - as? TemplateCVC else { return UICollectionViewCell() } - cell.dataBind(model: templateList[indexPath.item]) + withReuseIdentifier: StorageModalCVC.classIdentifier, for: indexPath) + as? StorageModalCVC else { return UICollectionViewCell() } + cell.dataBind(model: templateList[indexPath.item], indexPath: indexPath) return cell } } diff --git a/Hara_Demo/Hara_Demo/Sungho/Worry/WorryCVC.swift b/Hara_Demo/Hara_Demo/Sungho/Storage/StorageCVC.swift similarity index 50% rename from Hara_Demo/Hara_Demo/Sungho/Worry/WorryCVC.swift rename to Hara_Demo/Hara_Demo/Sungho/Storage/StorageCVC.swift index b744729..8e6271e 100644 --- a/Hara_Demo/Hara_Demo/Sungho/Worry/WorryCVC.swift +++ b/Hara_Demo/Hara_Demo/Sungho/Storage/StorageCVC.swift @@ -9,13 +9,11 @@ import UIKit import SnapKit import Then -class WorryCVC: UICollectionViewCell { +class StorageCVC: UICollectionViewCell { - private let worryCell = UIView().then{ + private let worryCell = UIImageView().then{ + $0.image = UIImage(named: "framebg") $0.backgroundColor = .clear - $0.layer.cornerRadius = 4 - $0.layer.borderWidth = 1.5 - $0.layer.borderColor = UIColor.white.cgColor } private let jewelImage = UIImageView().then{ @@ -25,14 +23,19 @@ class WorryCVC: UICollectionViewCell { private let worryTitle = UILabel().then{ $0.text = "고민 제목입니당" - $0.font = .systemFont(ofSize: 16, weight: .bold) + $0.font = .systemFont(ofSize: 14, weight: .bold) $0.textColor = .white } + + private let divLine = UIImageView().then{ + $0.image = UIImage(named: "div_line") + $0.backgroundColor = .clear + } private let worryDate = UILabel().then{ $0.text = "2023.02.10~2023.04.01" - $0.font = .systemFont(ofSize: 12, weight: .medium) - $0.textColor = .white + $0.font = .systemFont(ofSize: 12, weight: .light) + $0.textColor = 0x9BA1AA.color } override init(frame: CGRect) { @@ -45,7 +48,7 @@ class WorryCVC: UICollectionViewCell { } } -extension WorryCVC{ +extension StorageCVC{ // MARK: - Layout private func setLayout() { @@ -57,32 +60,35 @@ extension WorryCVC{ $0.edges.equalToSuperview() } -// worryCell.snp.makeConstraints{ -// $0.width.equalTo(164.adjustedW) -// $0.height.equalTo(164) -// } - - worryCell.addSubviews([jewelImage, worryTitle, worryDate]) + worryCell.addSubviews([jewelImage, worryTitle, divLine, worryDate]) jewelImage.snp.makeConstraints{ - $0.width.height.equalTo(30.adjustedW) - $0.leading.equalTo(12.adjustedW) - $0.top.equalTo(12.adjustedW) + $0.width.height.equalTo(80.adjustedW) + $0.centerX.equalToSuperview() + $0.top.equalTo(8.adjustedW) } worryTitle.snp.makeConstraints{ - $0.leading.equalTo(14.adjustedW) - $0.top.equalTo(jewelImage.snp.bottom).offset(64.adjustedW) + $0.centerX.equalToSuperview() + $0.top.equalTo(jewelImage.snp.bottom).offset(10.adjustedW) + } + + divLine.snp.makeConstraints{ + $0.centerX.equalToSuperview() + $0.top.equalTo(worryTitle.snp.bottom).offset(8.adjustedW) + $0.width.equalTo(140.adjustedW) + $0.height.equalTo(6) } worryDate.snp.makeConstraints{ - $0.leading.equalTo(14.adjustedW) - $0.top.equalTo(worryTitle.snp.bottom).offset(7.adjustedW) + $0.centerX.equalToSuperview() + $0.top.equalTo(divLine.snp.bottom).offset(8.adjustedW) } } - func dataBind(model: WorryListModel) { + func dataBind(model: WorryListPublisherModel) { + jewelImage.image = model.image worryTitle.text = model.title - worryDate.text = model.startDate + "~" + model.endDate + worryDate.text = model.period } } diff --git a/Hara_Demo/Hara_Demo/Sungho/Worry/WorryCV.swift b/Hara_Demo/Hara_Demo/Sungho/Storage/StorageVC.swift similarity index 68% rename from Hara_Demo/Hara_Demo/Sungho/Worry/WorryCV.swift rename to Hara_Demo/Hara_Demo/Sungho/Storage/StorageVC.swift index 7f64f42..72cb20d 100644 --- a/Hara_Demo/Hara_Demo/Sungho/Worry/WorryCV.swift +++ b/Hara_Demo/Hara_Demo/Sungho/Storage/StorageVC.swift @@ -10,19 +10,19 @@ import SnapKit import Then import Combine -class WorryCV: UIViewController, RefreshListDelegate{ +class StorageVC: UIViewController, RefreshListDelegate{ // MARK: - Properties - var worryVM: WorryVM = WorryVM() - var modalVC = ModalVC() + var worryVM: WorryViewModel = WorryViewModel() + var modalVC = StorageModalVC() - var worryList: [WorryListModel] = [] + var worryList: [WorryListPublisherModel] = [] var disposalbleBag = Set() private let titleLabel = UILabel().then{ - $0.text = "과거의 고민" + $0.text = "보석고민함" $0.textColor = .white - $0.font = .systemFont(ofSize: 26, weight: .bold) + $0.font = .systemFont(ofSize: 20, weight: .medium) } private let templateBtn = UIButton().then{ @@ -46,9 +46,9 @@ class WorryCV: UIViewController, RefreshListDelegate{ }() // MARK: - Constants - final let worryListInset: UIEdgeInsets = UIEdgeInsets(top: 25, left: 16.adjustedW, bottom: 100, right: 16.adjustedW) - final let interItemSpacing: CGFloat = 15.adjustedW - final let lineSpacing: CGFloat = 15.adjustedW + final let worryListInset: UIEdgeInsets = UIEdgeInsets(top: 12, left: 16.adjustedW, bottom: 100, right: 16.adjustedW) + final let interItemSpacing: CGFloat = 12.adjustedW + final let lineSpacing: CGFloat = 12.adjustedW // MARK: - Life Cycles override func viewDidLoad() { @@ -58,6 +58,10 @@ class WorryCV: UIViewController, RefreshListDelegate{ self.setBindings() self.registerCV() self.pressBtn() + print("printok?") + + // delegate 권한을 부여해줍니다. + modalVC.refreshListDelegate = self /// modalVC가 dismiss되는 것을 notificationCenter를 통해 worryVC가 알 수 있게 해줍니다. NotificationCenter.default.addObserver( @@ -73,54 +77,46 @@ class WorryCV: UIViewController, RefreshListDelegate{ DispatchQueue.main.async { [self] in /// modalVC가 dismiss될때 컬렉션뷰를 리로드해줍니다. - print(worryVM.worryList) + print(worryVM.worryListDummy) worryListCV.reloadData() print("reload 성공!") } } - func refreshList(list: [WorryListModel]) { - worryVM.worryList = list + func refreshList(templateTitle: String, list: [WorryListPublisherModel]) { + worryVM.worryListPublisher.value = list + sortHeaderView.sortBtn.setTitle(templateTitle, for: .normal) print("delegate") } private func registerCV() { - worryListCV.register(WorryCVC.self, - forCellWithReuseIdentifier: WorryCVC.classIdentifier) + worryListCV.register(StorageCVC.self, + forCellWithReuseIdentifier: StorageCVC.classIdentifier) worryListCV.register(WorryListHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: WorryListHeaderView.classIdentifier) } func pressBtn(){ sortHeaderView.sortBtn.press { - let modalVC = ModalVC() - modalVC.modalPresentationStyle = .pageSheet - - /// 클릭될때마다 delegate를 새로 받아올 수 있게 하여 권한을 계속 새롭게 부여해줍니다. - modalVC.refreshListDelegate = self + self.modalVC.modalPresentationStyle = .pageSheet - if let sheet = modalVC.sheetPresentationController { + if let sheet = self.modalVC.sheetPresentationController { - /// 지원할 크기 지정 - /// 크기 늘리고 싶으면 뒤에 ", .large()" 추가 - sheet.detents = [.medium()] + /// 지원할 크기 지정 .large() 혹은 .medium() + sheet.detents = [.large()] /// 시트 상단에 그래버 표시 (기본 값은 false) sheet.prefersGrabberVisible = true - - /// 뒤 배경 흐리게 제거 (기본 값은 모든 크기에서 배경 흐리게 됨) - /// 배경 흐리게 할 시에는 sheet가 올라왔을 때 배경 클릭해도 sheet 안 사라짐 - // sheet.largestUndimmedDetentIdentifier = .medium } - self.present(modalVC, animated: true) + self.present(self.modalVC, animated: true) } } } // MARK: - 뷰모델 관련 -extension WorryCV{ +extension StorageVC{ /// 뷰모델의 데이터를 뷰컨의 리스트 데이터와 연동 fileprivate func setBindings(){ print("ViewController - setBindings()") - self.worryVM.$worryList.sink{ [weak self] (updatedList : [WorryListModel]) in + self.worryVM.worryListPublisher.sink{ [weak self] (updatedList : [WorryListPublisherModel]) in print("ViewController - updatedList.count: \(updatedList.count)") self?.worryList = updatedList self?.sortHeaderView.numLabel.text = "총 \(self!.worryList.count)개" @@ -129,38 +125,38 @@ extension WorryCV{ } // MARK: - Layout -extension WorryCV{ +extension StorageVC{ private func setLayout(){ - view.backgroundColor = .black + view.backgroundColor = 0x1E2227.color view.addSubviews([titleLabel, templateBtn, sortHeaderView, worryListCV]) titleLabel.snp.makeConstraints{ - $0.top.equalTo(self.view.safeAreaLayoutGuide).offset(40.adjustedH) - $0.leading.equalTo(self.view.safeAreaLayoutGuide).offset(16.adjustedW) + $0.top.equalTo(self.view.safeAreaLayoutGuide).offset(24.adjustedW) + $0.centerX.equalToSuperview() } templateBtn.snp.makeConstraints{ - $0.top.equalTo(self.view.safeAreaLayoutGuide).offset(40.adjustedH) + $0.top.equalTo(self.view.safeAreaLayoutGuide).offset(24.adjustedH) $0.trailing.equalTo(self.view.safeAreaLayoutGuide).offset(-16.adjustedW) } sortHeaderView.snp.makeConstraints{ $0.top.equalTo(templateBtn.snp.bottom) $0.leading.trailing.equalTo(self.view.safeAreaLayoutGuide) - $0.height.equalTo(40) + $0.height.equalTo(75.adjustedW) } worryListCV.snp.makeConstraints{ - $0.top.equalTo(sortHeaderView.snp.bottom).offset(20) + $0.top.equalTo(sortHeaderView.snp.bottom).offset(12) $0.leading.trailing.bottom.equalTo(self.view.safeAreaLayoutGuide) } } } // MARK: - UICollectionDelegate -extension WorryCV: UICollectionViewDelegateFlowLayout { +extension StorageVC: UICollectionViewDelegateFlowLayout { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { - return CGSize(width: 164.adjustedW, height: 164.adjustedW) + return CGSize(width: 165.adjustedW, height: 165.adjustedW) } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { @@ -178,15 +174,15 @@ extension WorryCV: UICollectionViewDelegateFlowLayout { // MARK: - UICollectionViewDataSource -extension WorryCV: UICollectionViewDataSource { +extension StorageVC: UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return worryList.count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { guard let cell = collectionView.dequeueReusableCell( - withReuseIdentifier: WorryCVC.classIdentifier, for: indexPath) - as? WorryCVC else { return UICollectionViewCell() } + withReuseIdentifier: StorageCVC.classIdentifier, for: indexPath) + as? StorageCVC else { return UICollectionViewCell() } cell.dataBind(model: worryList[indexPath.item]) return cell } diff --git a/Hara_Demo/Hara_Demo/Sungho/Worry/WorryListHeaderView.swift b/Hara_Demo/Hara_Demo/Sungho/Storage/WorryListHeaderView.swift similarity index 51% rename from Hara_Demo/Hara_Demo/Sungho/Worry/WorryListHeaderView.swift rename to Hara_Demo/Hara_Demo/Sungho/Storage/WorryListHeaderView.swift index 35482e8..36b9c2f 100644 --- a/Hara_Demo/Hara_Demo/Sungho/Worry/WorryListHeaderView.swift +++ b/Hara_Demo/Hara_Demo/Sungho/Storage/WorryListHeaderView.swift @@ -14,19 +14,23 @@ class WorryListHeaderView: UICollectionReusableView { // MARK: - UI Components let numLabel = UILabel().then { - $0.text = "총 4개" + $0.text = "" $0.textColor = .white - $0.font = .systemFont(ofSize: 14.adjustedW, weight: .bold) + $0.font = .systemFont(ofSize: 14.adjustedW, weight: .light) } let sortBtn = UIButton().then { + $0.backgroundColor = 0x30363D.color + $0.layer.cornerRadius = 10 + $0.titleLabel?.font = .systemFont(ofSize: 14, weight: .medium) + $0.setTitle("모든 보석 보기", for: .normal) + $0.setTitleColor(0xFFE5A3.color, for: .normal) + } + + private let toggleBtn = UIImageView().then { + $0.image = UIImage(named: "toggle_down") + $0.contentMode = .scaleToFill $0.backgroundColor = .clear - $0.layer.cornerRadius = 4 - $0.layer.borderWidth = 1.5 - $0.layer.borderColor = UIColor.white.cgColor - $0.titleLabel?.font = .systemFont(ofSize: 14, weight: .bold) - $0.setTitle("전체", for: .normal) - $0.setTitleColor(.white, for: .normal) } // MARK: - View Life Cycle @@ -44,18 +48,25 @@ class WorryListHeaderView: UICollectionReusableView { extension WorryListHeaderView{ func setLayout(){ self.backgroundColor = .clear - self.addSubViews([numLabel, sortBtn]) + self.addSubViews([sortBtn, numLabel, toggleBtn]) + + sortBtn.snp.makeConstraints{ + $0.top.equalToSuperview().offset(24) + $0.leading.equalToSuperview().offset(16.adjustedW) + $0.trailing.equalToSuperview().offset(-16.adjustedW) + $0.height.equalTo(32.adjustedW) + } numLabel.snp.makeConstraints{ - $0.centerY.equalTo(sortBtn) + $0.top.equalTo(sortBtn.snp.bottom).offset(16) $0.leading.equalToSuperview().offset(16.adjustedW) } - sortBtn.snp.makeConstraints{ - $0.top.equalToSuperview().offset(24) - $0.trailing.equalToSuperview().offset(-16.adjustedW) - $0.width.equalTo(82.adjustedW) - $0.height.equalTo(24.adjustedW) + toggleBtn.snp.makeConstraints{ + $0.trailing.equalToSuperview().offset(-36.adjustedW) + $0.centerY.equalTo(sortBtn.snp.centerY) + $0.width.equalTo(12.adjustedW) + $0.height.equalTo(6.adjustedW) } } } diff --git a/Hara_Demo/Hara_Demo/Sungho/TemplateDetailModel.swift b/Hara_Demo/Hara_Demo/Sungho/TemplateDetailModel.swift new file mode 100644 index 0000000..845c7d7 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Sungho/TemplateDetailModel.swift @@ -0,0 +1,42 @@ +// +// TemplateDetailModel.swift +// Hara_Demo +// +// Created by saint on 2023/07/04. +// + +import Foundation + +struct BalanceGame: Codable { + let id: Int + let firstChoice: String + let secondChoice: String + + private enum CodingKeys: String, CodingKey { + case id = "id" + case firstChoice = "solution1" + case secondChoice = "solution2" + } + +} + +//struct Response: Codable { +// let status: Int +// let success: Bool +// let message: String +// let data: TemplateData +//} +// +//struct TemplateData: Codable { +// let info: String +// let title: String +// let questions: [String] +// let hints: [String] +// +// private enum CodingKeys: String, CodingKey { +// case info +// case title +// case questions +// case hints +// } +//} diff --git a/Hara_Demo/Hara_Demo/Sungho/TemplateListModel.swift b/Hara_Demo/Hara_Demo/Sungho/TemplateListModel.swift new file mode 100644 index 0000000..5b96d3f --- /dev/null +++ b/Hara_Demo/Hara_Demo/Sungho/TemplateListModel.swift @@ -0,0 +1,26 @@ +// +// TemplateListModel.swift +// MVVM-HARA +// +// Created by saint on 2023/04/01. +// + +import UIKit +import Foundation + +/// 서버통신용 모델 +struct TemplateListModel{ + let templateId: Int + let templateTitle: String + let templateDetail: String + let hasUsed: Bool +} + +/// View에 뿌려주기 위한 model +struct TemplateListPublisherModel{ + let templateId: Int + let templateTitle: String + let templateDetail: String + let image: UIImage +} + diff --git a/Hara_Demo/Hara_Demo/Sungho/ViewModel/TemplateViewModel.swift b/Hara_Demo/Hara_Demo/Sungho/ViewModel/TemplateViewModel.swift new file mode 100644 index 0000000..7fac553 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Sungho/ViewModel/TemplateViewModel.swift @@ -0,0 +1,57 @@ +// +// ArchiveTemplateViewModel.swift +// Hara_Demo +// +// Created by saint on 2023/07/11. +// + +import UIKit +import Combine + +class TemplateViewModel{ + + var IdtoImgTrueDict: [Int: String] = [0: "gem_pink_s_on", 1: "gem_pink_s_on", 2: "gem_orange_s_on", 3: "gem_blue_s_on", 4: "gemstone_green_s_on", 5: "gem_yellow_s_on", 6: "gem_red_s_on"] + + var IdtoImgFalseDict: [Int: String] = [0: "gem_pink_s_off", 1: "gem_pink_s_off", 2: "gem_orange_s_off", 3: "gem_blue_s_off", 4: "gemstone_green_s_off", 5: "gem_yellow_s_off", 6: "gem_red_s_off"] + + var templateListDummy = [ + TemplateListModel(templateId: 0, templateTitle: "모든 보석 보기", templateDetail: "그동안 캐낸 모든 보석을 볼 수 있어요", hasUsed: true), + TemplateListModel(templateId: 1, templateTitle: "Free Flow", templateDetail: "빈 공간을 자유롭게 채우기", hasUsed: true), + TemplateListModel(templateId: 2, templateTitle: "장단점 생각하기", templateDetail: "할까? 말까? 최고의 선택을 돕는 해결사", hasUsed: true), + TemplateListModel(templateId: 3, templateTitle: "다섯번의 왜?", templateDetail: "5why 기법을 활용한 물음표 곱씹기", hasUsed: true), + TemplateListModel(templateId: 4, templateTitle: "자기관리론", templateDetail: "데일카네기가 제시한 걱정 극복 글쓰기", hasUsed: false), + TemplateListModel(templateId: 5, templateTitle: "단 하나의 목표", templateDetail: "One thing, 우선순위 정하기", hasUsed: false), + TemplateListModel(templateId: 6, templateTitle: "땡스투 새겨보기", templateDetail: "긍정적인 힘을 만드는 감사 일기", hasUsed: false), + TemplateListModel(templateId: 7, templateTitle: "10-10-10", templateDetail: "수지 웰치의 좋은 결정을 내리는 간단한 방법", hasUsed: false), + TemplateListModel(templateId: 8, templateTitle: "실행력 키우기", templateDetail: "move! move! 일단 움직여, 실행론", hasUsed: false) + ] + + var templateUpdateList: [TemplateListPublisherModel] = [] + + lazy var templateListPublisher = CurrentValueSubject<[TemplateListPublisherModel], Never>(templateUpdateList) + + init(){ + print("ViewModel - init()") + templateUpdateList = [] + convertIdtoImg() + } +} + +// MARK: - Functions +extension TemplateViewModel{ + private func convertIdtoImg(){ + templateListDummy.forEach { + if $0.hasUsed == true{ + guard let imgName = IdtoImgTrueDict[$0.templateId] else { return } + templateUpdateList.append(TemplateListPublisherModel(templateId: $0.templateId, templateTitle: $0.templateTitle, templateDetail: $0.templateDetail, image: UIImage(named: imgName) ?? UIImage() )) + } + else{ + guard let imgName = IdtoImgFalseDict[$0.templateId] else { return } + templateUpdateList.append(TemplateListPublisherModel(templateId: $0.templateId, templateTitle: $0.templateTitle, templateDetail: $0.templateDetail, image: UIImage(named: imgName) ?? UIImage() )) + } + + } + } +} + + diff --git a/Hara_Demo/Hara_Demo/Sungho/ViewModel/WorryVM.swift b/Hara_Demo/Hara_Demo/Sungho/ViewModel/WorryVM.swift deleted file mode 100644 index bf32312..0000000 --- a/Hara_Demo/Hara_Demo/Sungho/ViewModel/WorryVM.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// ViewModel.swift -// MVVM-HARA -// -// Created by saint on 2023/03/31. -// - -import Foundation -import Combine - -// 뷰 모델로써 데이터의 상태를 가지고 있음 -class WorryVM: ObservableObject{ - - @Published var worryList: [WorryListModel] = [ - WorryListModel(templateId: 1, templateTitle: "할 일", title: "해라 릴리즈", startDate: "23.02.01", endDate: "23.02.02"), - WorryListModel(templateId: 2, templateTitle: "학업", title: "이번 학기 학점", startDate: "23.02.02", endDate: "23.02.04"), - WorryListModel(templateId: 3, templateTitle: "일상", title: "집에 갈까 말까", startDate: "23.02.03", endDate: "23.02.06"), - WorryListModel(templateId: 2, templateTitle: "학업", title: "수업 드랍할까 말까?", startDate: "23.02.04", endDate: "23.03.08"), - WorryListModel(templateId: 4, templateTitle: "진로", title: "머 해먹고 살지,,?", startDate: "23.02.05", endDate: "23.04.10"), - WorryListModel(templateId: 3, templateTitle: "일상", title: "저녁 뭐먹을까?", startDate: "23.03.03", endDate: "23.04.06"), - WorryListModel(templateId: 1, templateTitle: "할 일", title: "컴시이실 공부하기", startDate: "23.03.31", endDate: "23.04.20"), - WorryListModel(templateId: 1, templateTitle: "할 일", title: "데이터 엔지니어링 API", startDate: "23.03.31", endDate: "23.04.20") - ] - - @Published var templateList: [TemplateListModel] = [ - TemplateListModel(templateId: 0, templateTitle: "전체", templateDetail: "전체 고민을 모두 보여줍니다."), - TemplateListModel(templateId: 1, templateTitle: "할 일", templateDetail: "할 일을 정하는 데 사용할 템플릿입니다."), - TemplateListModel(templateId: 2, templateTitle: "학업", templateDetail: "학업에 관한 고민을 저장하기 위한 템플릿입니다."), - TemplateListModel(templateId: 3, templateTitle: "일상", templateDetail: "일상에서의 고민을 저장하기 위한 템플릿입니다."), - TemplateListModel(templateId: 4, templateTitle: "진로", templateDetail: "앞으로의 진로에 대한 고민을 저장하기 위한 템플릿입니다."), - TemplateListModel(templateId: 5, templateTitle: "연애", templateDetail: "연애에 대한 고민을 저장하기 위한 템플릿입니다."), - TemplateListModel(templateId: 6, templateTitle: "건강", templateDetail: "건강 대한 고민을 저장하기 위한 템플릿입니다.") - ] - - init(){ - print("ViewModel - init()") - } -} diff --git a/Hara_Demo/Hara_Demo/Sungho/ViewModel/WorryViewModel.swift b/Hara_Demo/Hara_Demo/Sungho/ViewModel/WorryViewModel.swift new file mode 100644 index 0000000..5ff8c86 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Sungho/ViewModel/WorryViewModel.swift @@ -0,0 +1,49 @@ +// +// ViewModel.swift +// MVVM-HARA +// +// Created by saint on 2023/03/31. +// + +import UIKit +import Combine + +// 뷰 모델로써 데이터의 상태를 가지고 있음 +class WorryViewModel{ + + var IdtoImgDict: [Int: String] = [1: "gem_pink_m", 2: "gem_orange_m", 3: "gem_blue_m", 4: "gemstone_green_m", 5: "gem_yellow_m", 6: "gem_red_m"] + + /// 서버에서 받아올 더미 + var worryListDummy = [ + WorryListModel(templateId: 1, templateTitle: "할 일", title: "해라 릴리즈", period: "23.02.01~23.02.02"), + WorryListModel(templateId: 2, templateTitle: "학업", title: "이번 학기 학점", period: "23.02.02~23.02.04"), + WorryListModel(templateId: 3, templateTitle: "일상", title: "집에 갈까 말까", period: "23.02.03~23.02.06"), + WorryListModel(templateId: 2, templateTitle: "학업", title: "수업 드랍할까 말까?", period: "23.02.04~23.02.08"), + WorryListModel(templateId: 4, templateTitle: "진로", title: "머 해먹고 살지,,?", period: "23.02.05~23.04.10"), + WorryListModel(templateId: 3, templateTitle: "일상", title: "저녁 뭐먹을까?", period: "23.03.03~23.04.06"), + WorryListModel(templateId: 1, templateTitle: "할 일", title: "컴시이실 공부하기", period: "23.03.31~23.04.20"), + WorryListModel(templateId: 1, templateTitle: "할 일", title: "컴시이실 공부하기", period: "23.04.02~23.04.30"), + WorryListModel(templateId: 5, templateTitle: "단 하나의 목표", title: "캐라 릴리즈", period: "23.06.30-~23.07.20"), + WorryListModel(templateId: 6, templateTitle: "땡스투 새겨보기", title: "회사 인턴", period: "23.07.17-~23.07.30") + ] + + var worryUpdateList: [WorryListPublisherModel] = [] + + lazy var worryListPublisher = CurrentValueSubject<[WorryListPublisherModel], Never>(worryUpdateList) + + init(){ + print("ViewModel - init()") + worryUpdateList = [] + convertIdtoImg() + } +} + +// MARK: - Functions +extension WorryViewModel{ + private func convertIdtoImg(){ + worryListDummy.forEach { + guard let imgName = IdtoImgDict[$0.templateId] else { return } + worryUpdateList.append(WorryListPublisherModel(templateId: $0.templateId, templateTitle: $0.templateTitle, title: $0.title, period: $0.period, image: UIImage(named: imgName) ?? UIImage() )) + } + } +} diff --git a/Hara_Demo/Hara_Demo/Sungho/Worry/WorryListModel.swift b/Hara_Demo/Hara_Demo/Sungho/Worry/WorryListModel.swift deleted file mode 100644 index 355dcf5..0000000 --- a/Hara_Demo/Hara_Demo/Sungho/Worry/WorryListModel.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// WorryListModel.swift -// MVVM-HARA -// -// Created by saint on 2023/03/31. -// - -import Foundation - -struct WorryListModel{ - let templateId: Int - let templateTitle: String - let title: String - let startDate: String - let endDate: String -} diff --git a/Hara_Demo/Hara_Demo/Sungho/WorryListModel.swift b/Hara_Demo/Hara_Demo/Sungho/WorryListModel.swift new file mode 100644 index 0000000..d3a2e97 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Sungho/WorryListModel.swift @@ -0,0 +1,25 @@ +// +// WorryListModel.swift +// MVVM-HARA +// +// Created by saint on 2023/03/31. +// + +import UIKit + +// 서버통신용 model(codable) +struct WorryListModel{ + let templateId: Int + let templateTitle: String + let title: String + let period: String +} + +// View에 뿌려주기 위한 model +struct WorryListPublisherModel{ + let templateId: Int + let templateTitle: String + let title: String + let period: String + let image: UIImage +} diff --git a/Hara_Demo/Hara_Demo/Sungho/Modal/TemplateCVC.swift b/Hara_Demo/Hara_Demo/Sungho/Write/Modal/WriteModalCVC.swift similarity index 50% rename from Hara_Demo/Hara_Demo/Sungho/Modal/TemplateCVC.swift rename to Hara_Demo/Hara_Demo/Sungho/Write/Modal/WriteModalCVC.swift index 979a6cc..7e83310 100644 --- a/Hara_Demo/Hara_Demo/Sungho/Modal/TemplateCVC.swift +++ b/Hara_Demo/Hara_Demo/Sungho/Write/Modal/WriteModalCVC.swift @@ -1,36 +1,42 @@ // -// ModalCVC.swift -// MVVM-HARA +// WriteModalCVC.swift +// Hara_Demo // -// Created by saint on 2023/04/01. +// Created by saint on 2023/07/04. // import UIKit import SnapKit import Then -class TemplateCVC: UICollectionViewCell { +class WriteModalCVC: UICollectionViewCell { - private let templateCell = UIView().then{ + let templateCell = UIView().then{ $0.backgroundColor = .clear $0.layer.cornerRadius = 8 $0.layer.borderWidth = 1 $0.layer.borderColor = UIColor.systemGray.cgColor } - private let jewelImage = UIImageView().then{ + private let templateImage = UIImageView().then{ $0.image = UIImage(named: "jewel") $0.backgroundColor = .clear } private let templateTitle = UILabel().then{ - $0.font = .systemFont(ofSize: 16, weight: .medium) - $0.textColor = .black + $0.font = .systemFont(ofSize: 14, weight: .medium) + $0.textColor = .white } - + private let templateDetail = UILabel().then{ $0.font = .systemFont(ofSize: 12, weight: .light) - $0.textColor = .black + $0.textColor = 0x93A0AC.color + } + + let checkIcon = UIImageView().then{ + $0.image = UIImage(named: "icn_check") + $0.backgroundColor = .clear + $0.isHidden = true } override init(frame: CGRect) { @@ -43,7 +49,7 @@ class TemplateCVC: UICollectionViewCell { } } -extension TemplateCVC{ +extension WriteModalCVC{ // MARK: - Layout private func setLayout() { @@ -54,29 +60,35 @@ extension TemplateCVC{ templateCell.snp.makeConstraints{ $0.edges.equalToSuperview() } - - templateCell.addSubviews([jewelImage, templateTitle, templateDetail]) - jewelImage.snp.makeConstraints{ - $0.width.height.equalTo(30.adjustedW) - $0.leading.equalToSuperview().offset(18.adjustedW) + templateCell.addSubviews([templateImage, templateTitle, templateDetail, checkIcon]) + + templateImage.snp.makeConstraints{ + $0.width.height.equalTo(46.adjustedW) + $0.leading.equalToSuperview().offset(10.adjustedW) $0.centerY.equalToSuperview() } templateTitle.snp.makeConstraints{ - $0.leading.equalTo(jewelImage.snp.trailing).offset(13.adjustedW) - $0.top.equalToSuperview().offset(14.adjustedW) + $0.leading.equalTo(templateImage.snp.trailing).offset(8.adjustedW) + $0.top.equalToSuperview().offset(19.adjustedW) } templateDetail.snp.makeConstraints{ $0.leading.equalTo(templateTitle.snp.leading) - $0.top.equalTo(templateTitle.snp.bottom).offset(6.adjustedW) + $0.top.equalTo(templateTitle.snp.bottom).offset(4.adjustedW) + } + + checkIcon.snp.makeConstraints{ + $0.centerY.equalToSuperview() + $0.trailing.equalToSuperview().offset(-20.adjustedW) + $0.width.height.equalTo(26.adjustedW) } } - func dataBind(model: TemplateListModel) { + func dataBind(model: TemplateListPublisherModel, indexPath: IndexPath) { + templateImage.image = model.image templateTitle.text = model.templateTitle templateDetail.text = model.templateDetail } } - diff --git a/Hara_Demo/Hara_Demo/Sungho/Write/Modal/WriteModalVC.swift b/Hara_Demo/Hara_Demo/Sungho/Write/Modal/WriteModalVC.swift new file mode 100644 index 0000000..60ee370 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Sungho/Write/Modal/WriteModalVC.swift @@ -0,0 +1,155 @@ +// +// ModalVC.swift +// Hara_Demo +// +// Created by saint on 2023/07/04. +// + +import UIKit +import SnapKit +import Then +import Combine + +protocol TemplageTitleDelegate: AnyObject { + func sendTitle(templateTitle: String) +} + +class WriteModalVC: UIViewController { + + // MARK: - Properties + var templateVM: TemplateViewModel = TemplateViewModel() + + var templateList: [TemplateListPublisherModel] = [] + var disposalbleBag = Set() + + weak var sendTitleDelegate: TemplageTitleDelegate? + + private var templateIndex: Int = 0 + + private let flowLayout = UICollectionViewFlowLayout().then{ + $0.scrollDirection = .vertical + } + + private lazy var templateListCV: UICollectionView = { + let view = UICollectionView(frame: .zero, collectionViewLayout: self.flowLayout) + view.showsHorizontalScrollIndicator = false + view.backgroundColor = .clear + view.delegate = self + view.dataSource = self + return view + }() + + // MARK: - Constants + final let templateListInset: UIEdgeInsets = UIEdgeInsets(top: 30, left: 12.adjustedW, bottom: 20, right: 12.adjustedW) + final let lineSpacing: CGFloat = 8 + + // MARK: - Life Cycles + override func viewDidLoad() { + super.viewDidLoad() + + self.setBindings() + self.registerCV() + self.setLayout() + } + + override func viewWillDisappear(_ animated: Bool) { + super.viewWillDisappear(animated) + NotificationCenter.default.post(name: NSNotification.Name("DismissModalView"), object: nil, userInfo: nil) + } + + // MARK: - Functions + private func registerCV() { + templateListCV.register(WriteModalCVC.self, + forCellWithReuseIdentifier: WriteModalCVC.classIdentifier) + } +} + +// MARK: - Layout +extension WriteModalVC{ + + private func setLayout(){ + view.backgroundColor = 0x1E2227.color + view.addSubview(templateListCV) + + templateListCV.snp.makeConstraints{ + $0.top.equalToSuperview().offset(5) + $0.leading.trailing.bottom.equalTo(self.view.safeAreaLayoutGuide) + } + } +} + + +// MARK: - 뷰모델 관련 +extension WriteModalVC{ + + /// 뷰모델의 데이터를 뷰컨의 리스트 데이터와 연동 + fileprivate func setBindings(){ + print("ViewController - setBindings()") + self.templateVM.templateListPublisher.sink{ (updatedList : [TemplateListPublisherModel]) in + print("ViewController - updatedList.count: \(updatedList.count)") + self.templateList = updatedList + }.store(in: &disposalbleBag) + } +} + +// MARK: - UICollectionDelegate + +extension WriteModalVC: UICollectionViewDelegateFlowLayout { + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + return CGSize(width: 352.adjustedW, height: 72.adjustedW) + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { + return lineSpacing + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { + return templateListInset + } + + + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + print("click index=\(indexPath.row)") + + // 기존의 선택되었던 Cell의 디자인을 초기화한다. + if let previousCell = collectionView.cellForItem(at: IndexPath(row: templateIndex, section: 0)) as? WriteModalCVC { + previousCell.templateCell.layer.borderColor = UIColor.systemGray.cgColor + previousCell.checkIcon.isHidden = true + } + + // 새롭게 선택된 Cell의 디자인을 변경한다. + if let currentCell = collectionView.cellForItem(at: indexPath) as? WriteModalCVC { + currentCell.templateCell.layer.borderColor = 0xF6CE66.color.cgColor + currentCell.checkIcon.isHidden = false + } + + templateIndex = indexPath.row + + print("templateIndex=\(templateIndex)") + + self.dismiss(animated: true, completion: nil) + + /// 선택한 카테고리의 종류를 WriteVC로 보내줌으로써 화면에 선택된 템플릿이 무엇인지를 알려줍니다. + /// '모든 보석 보기' cell은 포함하면 안되므로, 그 다음 셀의 제목을 첫번째 제목으로 하기 위해 +1을 해줍니다. + sendTitleDelegate?.sendTitle(templateTitle: templateVM.templateListPublisher.value[templateIndex + 1].templateTitle) + } +} + +// MARK: - UICollectionViewDataSource + +extension WriteModalVC: UICollectionViewDataSource { + /// '모든 보석 보기' cell은 제외해야 하기에 -1을 해줍니다. + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return templateList.count - 1 + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + guard let cell = collectionView.dequeueReusableCell( + withReuseIdentifier: WriteModalCVC.classIdentifier, for: indexPath) + as? WriteModalCVC else { return UICollectionViewCell() } + /// '모든 보석 보기' cell은 포함하면 안되므로, 그 다음 셀의 제목을 첫번째 제목으로 하기 위해 +1을 해줍니다. + cell.dataBind(model: templateList[indexPath.item + 1], indexPath: indexPath) + return cell + } +} + diff --git a/Hara_Demo/Hara_Demo/Sungho/Write/WriteVC.swift b/Hara_Demo/Hara_Demo/Sungho/Write/WriteVC.swift new file mode 100644 index 0000000..33a1799 --- /dev/null +++ b/Hara_Demo/Hara_Demo/Sungho/Write/WriteVC.swift @@ -0,0 +1,390 @@ +// +// addVC.swift +// Hara_Demo +// +// Created by saint on 2023/07/03. +// + +import UIKit +import SnapKit +import Then +import SwiftyColor + +class WriteVC: UIViewController, TemplageTitleDelegate{ + + func sendTitle(templateTitle: String) { + self.templateTitle.text = templateTitle + } + + // MARK: - Properties + private let writeModalVC = WriteModalVC() + + private let closeBtn = UIButton().then { + $0.setBackgroundImage(UIImage(named: "icn_back"), for: .normal) + $0.contentMode = .scaleAspectFit + } + + private let completeBtn = UIButton().then { + $0.backgroundColor = 0x444C55.color // gray_3 + $0.titleLabel?.font = .systemFont(ofSize: 14.adjustedW, weight: .medium) + $0.setTitle("완료", for: .normal) + $0.setTitleColor(.white, for: .normal) + $0.layer.cornerRadius = 12 + } + + private let templateBtn = UIButton().then { + $0.backgroundColor = .clear + } + + private let templateTitle = UILabel().then { + $0.text = "템플릿을 선택해주세요" + $0.textColor = .white + $0.font = .systemFont(ofSize: 16.adjustedW, weight: .medium) + } + + private let dropdownImg = UIImageView().then { + $0.image = UIImage(named: "icn_drop_down") + $0.contentMode = .scaleAspectFit + $0.backgroundColor = .clear + } + + private let underLine = UIView().then { + $0.backgroundColor = 0x444444.color + } + + private let worryTitleLabel = UILabel().then { + $0.text = "고민에 이름을 붙여주세요" + $0.textColor = .white + $0.font = .systemFont(ofSize: 16.adjustedW, weight: .medium) + } + + private let worryTitleTextField = UITextField().then{ + $0.layer.cornerRadius = 8 + $0.backgroundColor = 0x444C55.color + $0.textColor = 0x9BA1AA.color + $0.font = .systemFont(ofSize: 12.adjustedW, weight: .medium) + $0.addLeftPadding() + + // Placeholder 색상 설정 + let placeholderText = "이 고민에 이름을 붙이자면..." + let placeholderColor = 0x9BA1AA.color + $0.attributedPlaceholder = NSAttributedString(string: placeholderText, attributes: [NSAttributedString.Key.foregroundColor: placeholderColor]) + } + + private let worryContentLabel = UILabel().then { + $0.text = "고민 내용 작성하기" + $0.textColor = .white + $0.font = .systemFont(ofSize: 16.adjustedW, weight: .medium) + } + + private let baseImage = UIImageView().then { + $0.image = UIImage(named: "no_template") + $0.contentMode = .scaleToFill + $0.backgroundColor = .clear + } + + private let introTitle = UILabel().then { + $0.text = "선택된 템플릿이 없어요!" + $0.textColor = .white + $0.font = .systemFont(ofSize: 18.adjustedW, weight: .semibold) + } + + private let introDetail = UILabel().then { + $0.text = "상단에서 템플릿을 골라볼까요?" + $0.textColor = 0x9BA1AA.color + $0.font = .systemFont(ofSize: 12.adjustedW, weight: .light) + } + + // pickerView 관련 코드 + let pickerVC = UIViewController() + let pickerData = Array(1...30).map { String($0) } + + private let datePickerView = UIPickerView().then{ + $0.backgroundColor = 0x1E2227.color + $0.layer.cornerRadius = 8 + } + + private let pickerViewTitle = UILabel().then{ + $0.text = "이 고민, 언제까지 끝낼까요?" + $0.font = .systemFont(ofSize: 16, weight: .bold) + $0.textColor = 0xF6CE66.color + } + + private let firstLabel = UILabel().then{ + $0.text = "이 고민을" + $0.font = .systemFont(ofSize: 20) + $0.textColor = .white + } + + private let secondLabel = UILabel().then{ + $0.text = "일 후까지 끝낼게요" + $0.font = .systemFont(ofSize: 20) + $0.textColor = .white + } + + private let upperCover = UIView().then{ + $0.backgroundColor = 0x1E2227.color + } + + private let lowerCover = UIView().then{ + $0.backgroundColor = 0x1E2227.color + } + + private let completeWritingBtn = UIButton().then{ + $0.backgroundColor = 0xB6BCC6.color + $0.titleLabel?.font = .systemFont(ofSize: 16.adjustedW, weight: .medium) + $0.setTitle("작성완료", for: .normal) + $0.setTitleColor(.black, for: .normal) + $0.layer.cornerRadius = 8 + } + + private let noDeadlineBtn = UIButton().then{ + $0.backgroundColor = .clear + $0.titleLabel?.font = .systemFont(ofSize: 14.adjustedW, weight: .medium) + + let title = "기한 설정하지 않기" + let titleAttributes: [NSAttributedString.Key: Any] = [ + .font: UIFont.systemFont(ofSize: 14.adjustedW, weight: .medium), + .foregroundColor: 0xB9C4DA.color, + .underlineStyle: NSUnderlineStyle.single.rawValue, + .underlineColor: 0xB9C4DA.color + ] + + let attributedTitle = NSAttributedString(string: title, attributes: titleAttributes) + $0.setAttributedTitle(attributedTitle, for: .normal) + } + + + // MARK: - Life Cycles + override func viewDidLoad() { + super.viewDidLoad() + writeModalVC.sendTitleDelegate = self + datePickerView.delegate = self + datePickerView.dataSource = self + setLayout() + pressBtn() + } + + // MARK: - Functions + private func pressBtn(){ + closeBtn.press { [self] in + dismiss(animated: true) + } + + completeBtn.press { + self.setPickerViewLayout(pickVC: self.pickerVC) + } + + templateBtn.press { + self.writeModalVC.modalPresentationStyle = .pageSheet + + if let sheet = self.writeModalVC.sheetPresentationController { + + /// 지원할 크기 지정 + /// 크기 늘리고 싶으면 뒤에 ", .large()" 추가 + /// 줄이려면 .medium() + sheet.detents = [.large()] + + /// 시트 상단에 그래버 표시 (기본 값은 false) + sheet.prefersGrabberVisible = true + + /// 뒤 배경 흐리게 제거 (기본 값은 모든 크기에서 배경 흐리게 됨) + /// 배경 흐리게 할 시에는 sheet가 올라왔을 때 배경 클릭해도 sheet 안 사라짐 + // sheet.largestUndimmedDetentIdentifier = .medium + } + self.present(self.writeModalVC, animated: true) + } + } +} + +// MARK: - Layout +extension WriteVC{ + private func setLayout(){ + view.backgroundColor = 0x1E2227.color + view.addSubviews([closeBtn, completeBtn, templateBtn, templateTitle]) + templateBtn.addSubviews([templateTitle, dropdownImg, underLine]) + view.addSubviews([worryTitleLabel, worryTitleTextField, worryContentLabel]) + view.addSubviews([baseImage, introTitle, introDetail]) + + closeBtn.snp.makeConstraints{ + $0.top.equalTo(self.view.safeAreaLayoutGuide).offset(20.adjustedW) + $0.leading.equalTo(self.view.safeAreaLayoutGuide).offset(16.adjustedW) + $0.height.width.equalTo(24.adjustedW) + } + + completeBtn.snp.makeConstraints{ + $0.top.equalTo(self.view.safeAreaLayoutGuide).offset(20.adjustedW) + $0.trailing.equalTo(self.view.safeAreaLayoutGuide).offset(-16.adjustedW) + $0.width.equalTo(50.adjustedW) + $0.height.equalTo(26.adjustedW) + } + + templateBtn.snp.makeConstraints{ + $0.top.equalTo(completeBtn.snp.bottom).offset(16) + $0.height.equalTo(60.adjustedW) + $0.leading.trailing.equalToSuperview() + } + + templateTitle.snp.makeConstraints{ + $0.leading.equalToSuperview().offset(12.adjustedW) + $0.centerY.equalToSuperview() + } + + dropdownImg.snp.makeConstraints{ + $0.trailing.equalToSuperview().offset(-16.adjustedW) + $0.centerY.equalToSuperview() + $0.height.width.equalTo(24.adjustedW) + } + + underLine.snp.makeConstraints{ + $0.bottom.equalTo(templateBtn.snp.bottom) + $0.leading.trailing.equalToSuperview() + $0.height.equalTo(1) + } + + worryTitleLabel.snp.makeConstraints{ + $0.top.equalTo(underLine.snp.bottom).offset(20.adjustedW) + $0.leading.equalToSuperview().offset(12.adjustedW) + } + + worryTitleTextField.snp.makeConstraints{ + $0.top.equalTo(worryTitleLabel.snp.bottom).offset(12.adjustedW) + $0.leading.equalToSuperview().offset(12) + $0.trailing.equalToSuperview().offset(-12) + $0.height.equalTo(44.adjustedW) + } + + worryContentLabel.snp.makeConstraints{ + $0.top.equalTo(worryTitleTextField.snp.bottom).offset(26.adjustedW) + $0.leading.equalToSuperview().offset(12.adjustedW) + } + + baseImage.snp.makeConstraints{ + $0.top.equalTo(worryContentLabel.snp.bottom).offset(120.adjustedW) + $0.centerX.equalToSuperview() + $0.width.equalTo(120.adjustedW) + $0.height.equalTo(95.adjustedW) + } + + introTitle.snp.makeConstraints{ + $0.top.equalTo(baseImage.snp.bottom).offset(32) + $0.centerX.equalToSuperview() + } + + introDetail.snp.makeConstraints{ + $0.top.equalTo(introTitle.snp.bottom).offset(16) + $0.centerX.equalToSuperview() + } + } + + private func setPickerViewLayout(pickVC: UIViewController) -> Void{ + let pickerVC = UIViewController() + pickerVC.view.backgroundColor = .black.withAlphaComponent(0.5) + pickerVC.view.addSubview(datePickerView) + datePickerView.addSubviews([upperCover, pickerViewTitle, lowerCover, completeWritingBtn, noDeadlineBtn]) + + upperCover.snp.makeConstraints{ + $0.top.leading.trailing.equalToSuperview() + $0.height.equalTo(170) + } + + pickerViewTitle.snp.makeConstraints{ + $0.top.equalToSuperview().offset(90.adjustedW) + $0.centerX.equalToSuperview() + } + + lowerCover.snp.makeConstraints{ + $0.bottom.leading.trailing.equalToSuperview() + $0.height.equalTo(180) + } + + completeWritingBtn.snp.makeConstraints{ + $0.width.equalTo(326.adjustedW) + $0.height.equalTo(52.adjustedW) + $0.centerX.equalToSuperview() + $0.bottom.equalToSuperview().offset(-90.adjustedW) + } + + noDeadlineBtn.snp.makeConstraints{ + $0.width.equalTo(113.adjustedW) + $0.height.equalTo(21.adjustedW) + $0.centerX.equalToSuperview() + $0.bottom.equalToSuperview().offset(-56.adjustedW) + } + + /// pickerView 관련 화면 + datePickerView.addSubviews([firstLabel, secondLabel]) + + datePickerView.snp.makeConstraints{ + $0.width.equalTo(358.adjustedW) + $0.height.equalTo(448.adjustedW) + $0.center.equalToSuperview() + } + + firstLabel.snp.makeConstraints{ + $0.leading.equalToSuperview().offset(32.adjustedW) + $0.centerY.equalToSuperview() + } + + secondLabel.snp.makeConstraints{ + $0.trailing.equalToSuperview().offset(-32.adjustedW) + $0.centerY.equalToSuperview() + } + + // pickerView 애니메이션 설정 + datePickerView.alpha = 0 /// pickerView를 초기에 보이지 않게 설정 + /// + pickerVC.modalPresentationStyle = .overCurrentContext + present(pickerVC, animated: false, completion: { /// 애니메이션을 false로 설정 + UIView.animate(withDuration: 0.5, animations: { /// 애니메이션 추가 + self.datePickerView.snp.updateConstraints { + $0.center.equalToSuperview() /// pickerView를 중앙으로 이동 + } + self.datePickerView.alpha = 1 /// pickerView가 서서히 보이게 설정 + pickerVC.view.layoutIfNeeded() + }) + }) + } +} + + + +// MARK: - UIPickerViewDelegate, UIPickerViewDataSource +extension WriteVC: UIPickerViewDelegate, UIPickerViewDataSource{ + + func numberOfComponents(in pickerView: UIPickerView) -> Int { + return 1 + } + + func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { + return pickerData.count + } + + func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView { + let customView = UIView() + + let numLabel = UILabel().then{ + $0.text = pickerData[row] + $0.font = .systemFont(ofSize: 20) + $0.textColor = .white + } + + customView.addSubview(numLabel) + + numLabel.snp.makeConstraints{ + $0.leading.equalToSuperview().offset(138.adjustedW) + $0.centerY.equalToSuperview() + } + + return customView + } +} + +// MARK: - UITextField +extension UITextField { + func addLeftPadding() { + let paddingView = UIView(frame: CGRect(x: 0, y: 0, width: 10, height: self.frame.height)) + self.leftView = paddingView + self.leftViewMode = ViewMode.always + } +} diff --git a/Hara_Demo/Hara_Demo/TabBarController.swift b/Hara_Demo/Hara_Demo/TabBarController.swift new file mode 100644 index 0000000..beedbe5 --- /dev/null +++ b/Hara_Demo/Hara_Demo/TabBarController.swift @@ -0,0 +1,96 @@ +// +// TabBarController.swift +// Hara_Demo +// +// Created by 배성호 on 2022/11/17. +// + +import UIKit +import SnapKit +import Then +import SwiftyColor + +final class TabBarController: UITabBarController { + + // MARK: - Properties + let fixedHeight: CGFloat = 96 + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + setTabBar() + setTabBarStyle() + self.selectedIndex = 0 + self.delegate = self + } + + // TabBar높이 지정해주는 메서드 + override func viewDidLayoutSubviews() { + super.viewDidLayoutSubviews() + var tabFrame = self.tabBar.frame + tabFrame.size.height = fixedHeight + tabFrame.origin.y = self.view.frame.size.height - fixedHeight + self.tabBar.frame = tabFrame + + // additionalSafeAreaInsets 설정 + /// ViewController가 잘려서 아래 여백을 좀 더 주려고 inset 변경 + self.additionalSafeAreaInsets = UIEdgeInsets(top: 0, left: 0, bottom: -24, right: 0) + } + + // TabBarItem 생성해 주는 메서드 + private func makeTabVC(vc: UIViewController, tabBarImg: String, tabBarSelectedImg: String) -> UIViewController { + + vc.tabBarItem = UITabBarItem(title: nil, image: UIImage(named: tabBarImg)?.withRenderingMode(.alwaysOriginal), + selectedImage: UIImage(named: tabBarSelectedImg)?.withRenderingMode(.alwaysOriginal)) + + return vc + } + + /// TabBarItem을 지정하는 메서드 + func setTabBar() { + let homeTab = makeTabVC(vc: HomeVC(), tabBarImg:"icn_home_off", tabBarSelectedImg: "icn_home_on") + homeTab.tabBarItem.tag = 0 + + let writeTab = makeTabVC(vc: WriteVC(), tabBarImg: "icn_write", tabBarSelectedImg: "avatar_filled") + writeTab.tabBarItem.tag = 1 + + let storageTab = makeTabVC(vc: StorageVC(), tabBarImg: "icn_storage_off", tabBarSelectedImg: "icn_storage_on") + storageTab.tabBarItem.tag = 2 + + let insetAmount: CGFloat = 32 + homeTab.tabBarItem.imageInsets = UIEdgeInsets(top: -4, left: insetAmount, bottom: 4, right: -insetAmount) + writeTab.tabBarItem.imageInsets = UIEdgeInsets(top: -4, left: 0, bottom: 4, right: 0) + storageTab.tabBarItem.imageInsets = UIEdgeInsets(top: -4, left: -insetAmount, bottom: 4, right: insetAmount) + + let tabs = [homeTab, writeTab, storageTab] + self.setViewControllers(tabs, animated: false) + } + + /// TabBar의 Style을 지정하는 메서드 + private func setTabBarStyle() { + tabBar.backgroundColor = 0x2A2E33.color + tabBar.isTranslucent = false /// 투명 색 -> 반투명 색으로 바꿔주기 위해 false 로 설정(truetone color) + + // 탭바의 테두리를 설정합니다. + tabBar.layer.borderWidth = 1 + tabBar.layer.borderColor = 0x30363D.color.cgColor + tabBar.layer.cornerRadius = 30 + } +} + +// MARK: - UITabBarControllerDelegate +extension TabBarController: UITabBarControllerDelegate { + func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool { + if viewController.tabBarItem.tag == 1 { + let writeVC = WriteVC() + writeVC.modalPresentationStyle = .fullScreen + writeVC.modalTransitionStyle = .coverVertical + self.present(writeVC, animated: true, completion: nil) + return false // 탭 변경을 막음 + } + return true // 다른 탭은 정상적으로 변경 + } +} + + + diff --git a/Hara_Demo/Hara_Demo/ViewController.swift b/Hara_Demo/Hara_Demo/ViewController.swift deleted file mode 100644 index 87e670c..0000000 --- a/Hara_Demo/Hara_Demo/ViewController.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// ViewController.swift -// Hara_Demo -// -// Created by 김담인 on 2023/03/25. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - print("scenDelegate파일에서 rootViewController를 자신이 만든 뷰컨으로 바꿔서 사용하시오") - } - - -} -