From 8521d5b31ccbb401a2d7d0d47d8ca57c08c57ec5 Mon Sep 17 00:00:00 2001 From: joho2022 Date: Fri, 17 Jan 2025 01:25:18 +0900 Subject: [PATCH 01/14] =?UTF-8?q?[Chore]=20#33=20-=20=EB=94=94=EB=A0=89?= =?UTF-8?q?=ED=86=A0=EB=A6=AC=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project.pbxproj | 52 ++++++++++++------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/Napzakmarket-iOS/Napzakmarket-iOS.xcodeproj/project.pbxproj b/Napzakmarket-iOS/Napzakmarket-iOS.xcodeproj/project.pbxproj index f6422cc..0b30d73 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS.xcodeproj/project.pbxproj +++ b/Napzakmarket-iOS/Napzakmarket-iOS.xcodeproj/project.pbxproj @@ -31,9 +31,9 @@ 6C412F5D2D37DFC200998B27 /* TabBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AA20FA2D2C0B96004CC2E6 /* TabBarView.swift */; }; 6C693D132D2D7C2600758C6A /* TextField+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C693D122D2D7C2600758C6A /* TextField+.swift */; }; 6C71799E2D36118B00481622 /* String+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C71799D2D36118B00481622 /* String+.swift */; }; + 6C7179A22D36955C00481622 /* RegisterBuyPrice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C7179A12D36955C00481622 /* RegisterBuyPrice.swift */; }; D02CAB5C2D34A9CC00B0D93F /* ProductItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D02CAB5B2D34A9C200B0D93F /* ProductItemView.swift */; }; D02CAB612D34EBAB00B0D93F /* NZSegmentedControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = D02CAB602D34EB9C00B0D93F /* NZSegmentedControl.swift */; }; - 6C7179A22D36955C00481622 /* RegisterBuyPrice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C7179A12D36955C00481622 /* RegisterBuyPrice.swift */; }; D07A11F82D301BF400749962 /* ColorLiteral.swift in Sources */ = {isa = PBXBuildFile; fileRef = D07A11F72D301BE300749962 /* ColorLiteral.swift */; }; D07B6F282D30001700500B92 /* NapzakTextStyleModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = D07B6F272D30000900500B92 /* NapzakTextStyleModifier.swift */; }; D07B6F2A2D30017E00500B92 /* View+.swift in Sources */ = {isa = PBXBuildFile; fileRef = D07B6F292D30017B00500B92 /* View+.swift */; }; @@ -42,10 +42,6 @@ D0AA20EC2D2C0A56004CC2E6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D0AA20E72D2C0A56004CC2E6 /* Assets.xcassets */; }; D0AA20ED2D2C0A56004CC2E6 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AA20E82D2C0A56004CC2E6 /* ContentView.swift */; }; D0AA20EE2D2C0A56004CC2E6 /* Napzakmarket_iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AA20E92D2C0A56004CC2E6 /* Napzakmarket_iOSApp.swift */; }; - D0AA20FB2D2C0B9A004CC2E6 /* TabBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AA20FA2D2C0B96004CC2E6 /* TabBarView.swift */; }; - D0AA21092D2C0C17004CC2E6 /* DetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AA21082D2C0C15004CC2E6 /* DetailView.swift */; }; - D0AA210E2D2C0C49004CC2E6 /* SearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AA210D2D2C0C42004CC2E6 /* SearchView.swift */; }; - D0AA211D2D2C0C9C004CC2E6 /* SplashView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AA211C2D2C0C99004CC2E6 /* SplashView.swift */; }; D0AA21222D2C10CC004CC2E6 /* Moya in Frameworks */ = {isa = PBXBuildFile; productRef = D0AA21212D2C10CC004CC2E6 /* Moya */; }; D0AA21252D2C10E5004CC2E6 /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = D0AA21242D2C10E5004CC2E6 /* Kingfisher */; }; D0AA21282D2C1169004CC2E6 /* Lottie in Frameworks */ = {isa = PBXBuildFile; productRef = D0AA21272D2C1169004CC2E6 /* Lottie */; }; @@ -57,6 +53,8 @@ D63F2FCF2D38D6A300C1C7D1 /* splash(ios).json in Resources */ = {isa = PBXBuildFile; fileRef = D63F2FCE2D38D6A300C1C7D1 /* splash(ios).json */; }; D63F2FD12D38D92B00C1C7D1 /* SplashView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63F2FD02D38D92B00C1C7D1 /* SplashView.swift */; }; D63F2FD32D38E7BA00C1C7D1 /* AppState.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63F2FD22D38E7BA00C1C7D1 /* AppState.swift */; }; + D69485512D396A2A000D26E2 /* MarketModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D694854C2D396A2A000D26E2 /* MarketModel.swift */; }; + D69485522D396A2A000D26E2 /* MarketView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D694854E2D396A2A000D26E2 /* MarketView.swift */; }; D6C6750E2D32A5BB00DE6B4D /* Genre.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C6750D2D32A5BB00DE6B4D /* Genre.swift */; }; D6C675112D32AD1700DE6B4D /* MockGenreService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C675102D32AD1700DE6B4D /* MockGenreService.swift */; }; D6C675132D32B4B900DE6B4D /* APIResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C675122D32B4B900DE6B4D /* APIResponse.swift */; }; @@ -94,9 +92,9 @@ 6C693D122D2D7C2600758C6A /* TextField+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TextField+.swift"; sourceTree = ""; }; 6C693D142D2E4D9200758C6A /* TextEditor+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TextEditor+.swift"; sourceTree = ""; }; 6C71799D2D36118B00481622 /* String+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+.swift"; sourceTree = ""; }; + 6C7179A12D36955C00481622 /* RegisterBuyPrice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterBuyPrice.swift; sourceTree = ""; }; D02CAB5B2D34A9C200B0D93F /* ProductItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductItemView.swift; sourceTree = ""; }; D02CAB602D34EB9C00B0D93F /* NZSegmentedControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NZSegmentedControl.swift; sourceTree = ""; }; - 6C7179A12D36955C00481622 /* RegisterBuyPrice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterBuyPrice.swift; sourceTree = ""; }; D07A11F72D301BE300749962 /* ColorLiteral.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorLiteral.swift; sourceTree = ""; }; D07B6F272D30000900500B92 /* NapzakTextStyleModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NapzakTextStyleModifier.swift; sourceTree = ""; }; D07B6F292D30017B00500B92 /* View+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+.swift"; sourceTree = ""; }; @@ -118,6 +116,8 @@ D63F2FCE2D38D6A300C1C7D1 /* splash(ios).json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "splash(ios).json"; sourceTree = ""; }; D63F2FD02D38D92B00C1C7D1 /* SplashView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashView.swift; sourceTree = ""; }; D63F2FD22D38E7BA00C1C7D1 /* AppState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppState.swift; sourceTree = ""; }; + D694854C2D396A2A000D26E2 /* MarketModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketModel.swift; sourceTree = ""; }; + D694854E2D396A2A000D26E2 /* MarketView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketView.swift; sourceTree = ""; }; D6C6750D2D32A5BB00DE6B4D /* Genre.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Genre.swift; sourceTree = ""; }; D6C675102D32AD1700DE6B4D /* MockGenreService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockGenreService.swift; sourceTree = ""; }; D6C675122D32B4B900DE6B4D /* APIResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIResponse.swift; sourceTree = ""; }; @@ -133,14 +133,6 @@ D6F528C42D3650A300D1F7A8 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = ""; }; /* End PBXFileReference section */ -/* Begin PBXFileSystemSynchronizedRootGroup section */ - 3C4F97D02D38F3B10070BC7D /* Market */ = { - isa = PBXFileSystemSynchronizedRootGroup; - path = Market; - sourceTree = ""; - }; -/* End PBXFileSystemSynchronizedRootGroup section */ - /* Begin PBXFrameworksBuildPhase section */ D0C2A8F32D2AA38E00C8616B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; @@ -334,7 +326,6 @@ D0AA20F62D2C0B15004CC2E6 /* Presentation */ = { isa = PBXGroup; children = ( - 3C4F97D02D38F3B10070BC7D /* Market */, D0AA20E82D2C0A56004CC2E6 /* ContentView.swift */, D63F2FCB2D369B9C00C1C7D1 /* AppEntryView.swift */, D0AA211A2D2C0C90004CC2E6 /* Splash */, @@ -343,6 +334,7 @@ D0AA210B2D2C0C34004CC2E6 /* Search */, 6C2D5B5D2D32AD2800E904C6 /* Register */, D0AA21062D2C0C04004CC2E6 /* Detail */, + D69485502D396A2A000D26E2 /* Market */, D0AA20FC2D2C0BC7004CC2E6 /* Mypage */, D0AA20F72D2C0B77004CC2E6 /* Tabbar */, ); @@ -566,6 +558,31 @@ path = Core; sourceTree = ""; }; + D694854D2D396A2A000D26E2 /* Model */ = { + isa = PBXGroup; + children = ( + D694854C2D396A2A000D26E2 /* MarketModel.swift */, + ); + path = Model; + sourceTree = ""; + }; + D694854F2D396A2A000D26E2 /* View */ = { + isa = PBXGroup; + children = ( + D694854E2D396A2A000D26E2 /* MarketView.swift */, + ); + path = View; + sourceTree = ""; + }; + D69485502D396A2A000D26E2 /* Market */ = { + isa = PBXGroup; + children = ( + D694854D2D396A2A000D26E2 /* Model */, + D694854F2D396A2A000D26E2 /* View */, + ); + path = Market; + sourceTree = ""; + }; D6C6750C2D32A50700DE6B4D /* OnboardingMock */ = { isa = PBXGroup; children = ( @@ -635,9 +652,6 @@ ); dependencies = ( ); - fileSystemSynchronizedGroups = ( - 3C4F97D02D38F3B10070BC7D /* Market */, - ); name = "Napzakmarket-iOS"; packageProductDependencies = ( D0AA21212D2C10CC004CC2E6 /* Moya */, @@ -734,6 +748,8 @@ D02CAB5C2D34A9CC00B0D93F /* ProductItemView.swift in Sources */, 3CF80CEE2D34357300E8DE1F /* PreView.swift in Sources */, D63F2FD12D38D92B00C1C7D1 /* SplashView.swift in Sources */, + D69485512D396A2A000D26E2 /* MarketModel.swift in Sources */, + D69485522D396A2A000D26E2 /* MarketView.swift in Sources */, 3CF80DC42D36A45300E8DE1F /* ReadyView.swift in Sources */, D07A11F82D301BF400749962 /* ColorLiteral.swift in Sources */, D6C675132D32B4B900DE6B4D /* APIResponse.swift in Sources */, From 3475e0d22340d5518d5bf79cbe7c89184ff0ac7d Mon Sep 17 00:00:00 2001 From: joho2022 Date: Fri, 17 Jan 2025 01:31:45 +0900 Subject: [PATCH 02/14] =?UTF-8?q?[Feat]=20#33=20-=20=ED=99=88=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20svg=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets.xcassets/Home/Contents.json | 6 + .../Home/img_banner_1.imageset/Contents.json | 15 +++ .../img_banner_1.imageset/img_banner_1.svg | 124 ++++++++++++++++++ .../Home/img_home_1.imageset/Contents.json | 15 +++ .../Home/img_home_1.imageset/img_home_1.svg | 7 + .../Home/img_home_2.imageset/Contents.json | 15 +++ .../Home/img_home_2.imageset/img_home_2.svg | 27 ++++ .../Home/img_home_3.imageset/Contents.json | 15 +++ .../Home/img_home_3.imageset/img_home_3.svg | 39 ++++++ .../Home/img_logo.imageset/Contents.json | 15 +++ .../Home/img_logo.imageset/img_logo.svg | 19 +++ .../Home/img_ready.imageset/Contents.json | 15 +++ .../Home/img_ready.imageset/img_ready.svg | 33 +++++ 13 files changed, 345 insertions(+) create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/Contents.json create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_1.imageset/Contents.json create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_1.imageset/img_banner_1.svg create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_1.imageset/Contents.json create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_1.imageset/img_home_1.svg create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_2.imageset/Contents.json create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_2.imageset/img_home_2.svg create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_3.imageset/Contents.json create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_3.imageset/img_home_3.svg create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_logo.imageset/Contents.json create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_logo.imageset/img_logo.svg create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/Contents.json create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/img_ready.svg diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/Contents.json b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_1.imageset/Contents.json b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_1.imageset/Contents.json new file mode 100644 index 0000000..bbc647b --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_1.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "img_banner_1.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_1.imageset/img_banner_1.svg b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_1.imageset/img_banner_1.svg new file mode 100644 index 0000000..5e720c0 --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_1.imageset/img_banner_1.svg @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_1.imageset/Contents.json b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_1.imageset/Contents.json new file mode 100644 index 0000000..1791242 --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_1.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "img_home_1.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_1.imageset/img_home_1.svg b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_1.imageset/img_home_1.svg new file mode 100644 index 0000000..4199aec --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_1.imageset/img_home_1.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_2.imageset/Contents.json b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_2.imageset/Contents.json new file mode 100644 index 0000000..b948268 --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_2.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "img_home_2.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_2.imageset/img_home_2.svg b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_2.imageset/img_home_2.svg new file mode 100644 index 0000000..e097e22 --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_2.imageset/img_home_2.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_3.imageset/Contents.json b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_3.imageset/Contents.json new file mode 100644 index 0000000..5b48f21 --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_3.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "img_home_3.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_3.imageset/img_home_3.svg b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_3.imageset/img_home_3.svg new file mode 100644 index 0000000..40e198b --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_home_3.imageset/img_home_3.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_logo.imageset/Contents.json b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_logo.imageset/Contents.json new file mode 100644 index 0000000..84e9181 --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_logo.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "img_logo.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_logo.imageset/img_logo.svg b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_logo.imageset/img_logo.svg new file mode 100644 index 0000000..a3081ca --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_logo.imageset/img_logo.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/Contents.json b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/Contents.json new file mode 100644 index 0000000..45c5618 --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "img_ready.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/img_ready.svg b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/img_ready.svg new file mode 100644 index 0000000..4d7260a --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/img_ready.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 36b192b8d70ecb3a8a6db36c04861d9406bc2205 Mon Sep 17 00:00:00 2001 From: joho2022 Date: Sat, 18 Jan 2025 02:40:52 +0900 Subject: [PATCH 03/14] =?UTF-8?q?[Feat]=20#33=20-=20=ED=99=88=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20svg=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../img_banner_1.imageset/img_banner_1.svg | 205 +++++++++--------- .../Home/img_banner_2.imageset/Contents.json | 15 ++ .../img_banner_2.imageset/img_banner_1.svg | 124 +++++++++++ 3 files changed, 238 insertions(+), 106 deletions(-) create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_2.imageset/Contents.json create mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_2.imageset/img_banner_1.svg diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_1.imageset/img_banner_1.svg b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_1.imageset/img_banner_1.svg index 5e720c0..dfbfd97 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_1.imageset/img_banner_1.svg +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_1.imageset/img_banner_1.svg @@ -1,124 +1,117 @@ - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + - - + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + - - - - - - - - - - - - - - - - - - - - - + + + + + + diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_2.imageset/Contents.json b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_2.imageset/Contents.json new file mode 100644 index 0000000..bbc647b --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_2.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "img_banner_1.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_2.imageset/img_banner_1.svg b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_2.imageset/img_banner_1.svg new file mode 100644 index 0000000..5e720c0 --- /dev/null +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_banner_2.imageset/img_banner_1.svg @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From c24143d3cbdd489929683da9ba8eab532a31997f Mon Sep 17 00:00:00 2001 From: joho2022 Date: Sat, 18 Jan 2025 02:42:02 +0900 Subject: [PATCH 04/14] =?UTF-8?q?[Refactor]=20#33=20-=20=EA=B3=B5=ED=86=B5?= =?UTF-8?q?=20=EC=83=81=ED=92=88=20=EC=85=80=20=EB=8F=99=EC=A0=81=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=ED=81=AC=EA=B8=B0=20=EB=8C=80=EC=9D=91=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProductItem/ProductItemView.swift | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift index e54df3e..4d5cd73 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift @@ -19,15 +19,15 @@ struct ProductItemView: View { //MARK: - Properties let isLikeButtonExist: Bool + let width: CGFloat //MARK: - Main Body var body: some View { - VStack(alignment: .leading) { + VStack() { productMain productInfo } - .frame(height: 254) } } @@ -40,6 +40,7 @@ extension ProductItemView { //추후 Image() 요소로 변경 예정 Rectangle() .fill(Color.napzakGrayScale(.gray300)) + .frame(width: width, height: width) HStack(alignment: .bottom) { switch product.productType { case .buy: @@ -56,7 +57,9 @@ extension ProductItemView { likeButton } } + .frame(maxWidth: .infinity, alignment: .center) } + .frame(width: width, height: width) } private var likeButton: some View { @@ -95,5 +98,26 @@ extension ProductItemView { .applyNapzakTextStyle(napzakFontStyle: .caption3Medium12) .foregroundStyle(Color.napzakGrayScale(.gray400)) } + .frame(width: width) } } + +#Preview { + let mock = ProductModel( + id: 1, + isLiked: true, + genreName: "산리오", + productName: "딸기 마이멜로디 마스코트 인형", + price: "35,000원", + uploadTime: "3시간 전", + productType: .sell, + isPriceNegotiable: false + ) + + ProductItemView( + product: mock, + isLikeButtonExist: false, + width: 160 + ) + .frame(height: 254) +} From 04ecba2a45bd5042f272986c68a825d648b62cc2 Mon Sep 17 00:00:00 2001 From: joho2022 Date: Sat, 18 Jan 2025 02:42:43 +0900 Subject: [PATCH 05/14] =?UTF-8?q?[Chore]=20#33=20-=20DummyData=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/ProductItem/ProductModel.swift | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductModel.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductModel.swift index 793909b..69e0e3e 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductModel.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductModel.swift @@ -216,4 +216,99 @@ extension ProductModel { ) ] } + + static func recommendedDummyList() -> [ProductModel] { + return [ + ProductModel( + id: 1, + isLiked: true, + genreName: "산리오", + productName: "딸기 마이멜로디 마스코트 인형", + price: "35,000원", + uploadTime: "3시간 전", + productType: .sell, + isPriceNegotiable: false + ), + ProductModel( + id: 2, + isLiked: false, + genreName: "산리오", + productName: "딸기 마이멜로디 마스코트 인형", + price: "35,000원", + uploadTime: "3시간 전", + productType: .buy, + isPriceNegotiable: true + ), + ProductModel( + id: 3, + isLiked: true, + genreName: "산리오", + productName: "딸기 마이멜로디 마스코트 인형", + price: "35,000원", + uploadTime: "3시간 전", + productType: .sell, + isPriceNegotiable: false + ), + ProductModel( + id: 4, + isLiked: false, + genreName: "산리오", + productName: "딸기 마이멜로디 마스코트 인형", + price: "35,000원", + uploadTime: "3시간 전", + productType: .buy, + isPriceNegotiable: true + ), + ProductModel( + id: 5, + isLiked: false, + genreName: "산리오", + productName: "딸기 마이멜로디 마스코트 인형", + price: "35,000원", + uploadTime: "3시간 전", + productType: .sell, + isPriceNegotiable: false + ), + ProductModel( + id: 6, + isLiked: false, + genreName: "산리오", + productName: "딸기 마이멜로디 마스코트 인형", + price: "35,000원", + uploadTime: "3시간 전", + productType: .buy, + isPriceNegotiable: true + ), + ProductModel( + id: 7, + isLiked: false, + genreName: "산리오", + productName: "딸기 마이멜로디 마스코트 인형", + price: "35,000원", + uploadTime: "3시간 전", + productType: .sell, + isPriceNegotiable: false + ), + ProductModel( + id: 8, + isLiked: false, + genreName: "산리오", + productName: "딸기 마이멜로디 마스코트 인형", + price: "35,000원", + uploadTime: "3시간 전", + productType: .buy, + isPriceNegotiable: false + ), + ProductModel( + id: 9, + isLiked: false, + genreName: "산리오", + productName: "딸기 마이멜로디 마스코트 인형", + price: "35,000원", + uploadTime: "3시간 전", + productType: .sell, + isPriceNegotiable: false + ) + ] + } } From d43c594c7efe99a11d1b6e43241c6eb239130518 Mon Sep 17 00:00:00 2001 From: joho2022 Date: Sat, 18 Jan 2025 02:45:10 +0900 Subject: [PATCH 06/14] =?UTF-8?q?[Refactor]=20#33=20-=20=ED=81=AC=EA=B8=B0?= =?UTF-8?q?=EC=A0=81=EC=9A=A9=20=EA=B0=9C=EC=84=A0=EB=90=9C=20=EC=83=81?= =?UTF-8?q?=ED=92=88=EC=85=80=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Presentation/Market/View/MarketView.swift | 7 +++++-- .../Presentation/Search/View/SearchView.swift | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Market/View/MarketView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Market/View/MarketView.swift index cfa5ed3..5d71e1a 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Market/View/MarketView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Market/View/MarketView.swift @@ -76,18 +76,21 @@ struct MarketView: View { ForEach(sellProducts) { product in ProductItemView( product: product, - isLikeButtonExist: false + isLikeButtonExist: false, + width: 160 ) } } else { ForEach(buyProducts) { product in ProductItemView( product: product, - isLikeButtonExist: false + isLikeButtonExist: false, + width: 160 ) } } } + .frame(height: 254) } .padding(.horizontal, 20) } diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift index a5763d7..b5781eb 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift @@ -133,18 +133,21 @@ extension SearchView { ForEach(sellProducts) { product in ProductItemView( product: product, - isLikeButtonExist: true + isLikeButtonExist: true, + width: 160 ) } } else if selectedIndex == 1 { ForEach(buyProducts) { product in ProductItemView( product: product, - isLikeButtonExist: true + isLikeButtonExist: true, + width: 160 ) } } } + .frame(height: 254) } } .padding(.horizontal, 20) From 85ba39e7e8ef5c2288a6cd4703e4161234e02b93 Mon Sep 17 00:00:00 2001 From: joho2022 Date: Sat, 18 Jan 2025 02:45:32 +0900 Subject: [PATCH 07/14] =?UTF-8?q?[Feat]=20#33=20-=20=ED=99=88=ED=99=94?= =?UTF-8?q?=EB=A9=B4=20UI=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project.pbxproj | 8 +- .../Presentation/Home/View/HomeView.swift | 277 +++++++++++++++++- .../Tabbar/Model/TabBarModel.swift | 2 +- 3 files changed, 281 insertions(+), 6 deletions(-) diff --git a/Napzakmarket-iOS/Napzakmarket-iOS.xcodeproj/project.pbxproj b/Napzakmarket-iOS/Napzakmarket-iOS.xcodeproj/project.pbxproj index 8194dfe..0aaafef 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS.xcodeproj/project.pbxproj +++ b/Napzakmarket-iOS/Napzakmarket-iOS.xcodeproj/project.pbxproj @@ -40,7 +40,6 @@ D07B6F2A2D30017E00500B92 /* View+.swift in Sources */ = {isa = PBXBuildFile; fileRef = D07B6F292D30017B00500B92 /* View+.swift */; }; D0A31DA02D37D7F700A92FBA /* ProductModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0A31D9F2D37D7F100A92FBA /* ProductModel.swift */; }; D0AA20EB2D2C0A56004CC2E6 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D0AA20E52D2C0A56004CC2E6 /* Preview Assets.xcassets */; }; - D0AA20EC2D2C0A56004CC2E6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D0AA20E72D2C0A56004CC2E6 /* Assets.xcassets */; }; D0AA20ED2D2C0A56004CC2E6 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AA20E82D2C0A56004CC2E6 /* ContentView.swift */; }; D0AA20EE2D2C0A56004CC2E6 /* Napzakmarket_iOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AA20E92D2C0A56004CC2E6 /* Napzakmarket_iOSApp.swift */; }; D0AA21222D2C10CC004CC2E6 /* Moya in Frameworks */ = {isa = PBXBuildFile; productRef = D0AA21212D2C10CC004CC2E6 /* Moya */; }; @@ -50,6 +49,7 @@ D0AA21332D2CFF0E004CC2E6 /* Pretendard-SemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = D0AA21312D2CFF0E004CC2E6 /* Pretendard-SemiBold.otf */; }; D0AA21342D2CFF0E004CC2E6 /* Pretendard-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = D0AA21302D2CFF0E004CC2E6 /* Pretendard-Medium.otf */; }; D0AA21362D2CFF9F004CC2E6 /* FontLiterial.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AA21352D2CFF99004CC2E6 /* FontLiterial.swift */; }; + D61342532D3A92B800E65EFD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D61342522D3A92B800E65EFD /* Assets.xcassets */; }; D63F2FCC2D369B9C00C1C7D1 /* AppEntryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63F2FCB2D369B9C00C1C7D1 /* AppEntryView.swift */; }; D63F2FCF2D38D6A300C1C7D1 /* splash(ios).json in Resources */ = {isa = PBXBuildFile; fileRef = D63F2FCE2D38D6A300C1C7D1 /* splash(ios).json */; }; D63F2FD12D38D92B00C1C7D1 /* SplashView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63F2FD02D38D92B00C1C7D1 /* SplashView.swift */; }; @@ -102,7 +102,6 @@ D07B6F292D30017B00500B92 /* View+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+.swift"; sourceTree = ""; }; D0A31D9F2D37D7F100A92FBA /* ProductModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProductModel.swift; sourceTree = ""; }; D0AA20E52D2C0A56004CC2E6 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; - D0AA20E72D2C0A56004CC2E6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; D0AA20E82D2C0A56004CC2E6 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; D0AA20E92D2C0A56004CC2E6 /* Napzakmarket_iOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Napzakmarket_iOSApp.swift; sourceTree = ""; }; D0AA20FA2D2C0B96004CC2E6 /* TabBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarView.swift; sourceTree = ""; }; @@ -114,6 +113,7 @@ D0AA21352D2CFF99004CC2E6 /* FontLiterial.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontLiterial.swift; sourceTree = ""; }; D0AA21372D2D00A3004CC2E6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; D0C2A8F62D2AA38E00C8616B /* Napzakmarket-iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Napzakmarket-iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + D61342522D3A92B800E65EFD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; D63F2FCB2D369B9C00C1C7D1 /* AppEntryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppEntryView.swift; sourceTree = ""; }; D63F2FCE2D38D6A300C1C7D1 /* splash(ios).json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = "splash(ios).json"; sourceTree = ""; }; D63F2FD02D38D92B00C1C7D1 /* SplashView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashView.swift; sourceTree = ""; }; @@ -275,7 +275,7 @@ children = ( D63F2FCD2D38D68400C1C7D1 /* Animation */, D0AA211F2D2C0CB9004CC2E6 /* Fonts */, - D0AA20E72D2C0A56004CC2E6 /* Assets.xcassets */, + D61342522D3A92B800E65EFD /* Assets.xcassets */, ); path = Resources; sourceTree = ""; @@ -711,9 +711,9 @@ files = ( D0AA20EB2D2C0A56004CC2E6 /* Preview Assets.xcassets in Resources */, D63F2FCF2D38D6A300C1C7D1 /* splash(ios).json in Resources */, - D0AA20EC2D2C0A56004CC2E6 /* Assets.xcassets in Resources */, D0AA21322D2CFF0E004CC2E6 /* Pretendard-Bold.otf in Resources */, D0AA21332D2CFF0E004CC2E6 /* Pretendard-SemiBold.otf in Resources */, + D61342532D3A92B800E65EFD /* Assets.xcassets in Resources */, D0AA21342D2CFF0E004CC2E6 /* Pretendard-Medium.otf in Resources */, D6C675182D32BC5400DE6B4D /* mock_genres_39.json in Resources */, ); diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift index 6ea9c1f..2a566ef 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift @@ -8,7 +8,282 @@ import SwiftUI struct HomeView: View { + + // MARK: - Properties + + @State private var currentPage: Int = 0 + private let bannerImages = ["img_banner_1", "img_banner_2"] + + @State var recomendedProducts = ProductModel.recommendedDummyList() + @State var sellProducts = ProductModel.sellDummyList() + @State var buyProducts = ProductModel.buyDummyList() + + let width = (UIScreen.main.bounds.width - 55) / 2 + + // MARK: - Main Body + var body: some View { - Text("HomeView!") + + ScrollView { + VStack(spacing: 0) { + LogoView() + NoticeCarouselView(currentPage: $currentPage, bannerImages: bannerImages) + + // 첫번째 섹션 + VStack(spacing: 16) { + RecommendedItemsTitleView() + ProductScrollView(width: width - 10, products: $recomendedProducts) + } + .padding(.leading, 20) + + // 두번째 섹션 + VStack(spacing: 16) { + ZStack(alignment: .bottom) { + HStack { + Image(.imgHome2) + Spacer() + } + + CommonTitleView( + title: "지금 가장 많이 찜한 납작템", + subTitle: "놓치면 아쉬운 인기아이템들을 구경해볼까요?", + alignment: .right + ) + .padding(.trailing, 20) + } + + MostLikedProductsView(width: width, products: $buyProducts) + } + .padding(.top, 50) + .padding(.horizontal, 20) + + // 세번째 섹션 + VStack(spacing: 16) { + ZStack(alignment: .bottom) { + HStack { + Spacer() + Image(.imgHome3) + } + .padding(.trailing, 20) + + CommonTitleView( + title: "다른 유저들은 뭐 찾고 있을까요?", + subTitle: "덕심 가득한 리스트에서 취향을 나눠보세요.", + alignment: .left + ) + .padding(.leading, 20) + } + + ProductScrollView(width: width - 10, products: $buyProducts) + .padding(.leading, 20) + } + .padding(.top, 60) + .padding(.bottom, 75) + } + } } } + +extension HomeView { + + private struct LogoView: View { + + // MARK: - Main Body + + var body: some View { + HStack() { + Image(.imgLogo) + .padding(.top, 19) + .padding(.bottom, 15) + .padding(.leading, 20) + + Spacer() + } + .frame(maxWidth: .infinity) + + } + } + + private struct NoticeCarouselView: View { + + // MARK: - Properties + @Binding var currentPage: Int + let bannerImages: [String] + + // MARK: - Main Body + + var body: some View { + VStack { + TabView(selection: $currentPage) { + ForEach(0.. [TabItem] { return [ - TabItem(title: "홈", defaultIcon: "ic_home", selectedIcon: "ic_home_select", view: AnyView(PreView())), + TabItem(title: "홈", defaultIcon: "ic_home", selectedIcon: "ic_home_select", view: AnyView(HomeView())), TabItem(title: "탐색", defaultIcon: "ic_look", selectedIcon: "ic_look_select", view: AnyView(SearchView())), TabItem(title: "등록", defaultIcon: "ic_register", selectedIcon: "ic_register_select", view: AnyView(EmptyView())), TabItem(title: "채팅", defaultIcon: "ic_chat", selectedIcon: "ic_chat_select", view: AnyView(ReadyComponent())), From 183c94ccb9d93695c1643dc0a46eb0ce80ecb7be Mon Sep 17 00:00:00 2001 From: joho2022 Date: Sat, 18 Jan 2025 02:52:38 +0900 Subject: [PATCH 08/14] =?UTF-8?q?[Chore]=20#33=20-=20=EC=83=81=ED=92=88?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=20lineLimit=20=EC=A0=81=EC=9A=A9=20=EB=B0=8F?= =?UTF-8?q?=20=EC=97=AC=EB=B0=B1=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Global/Components/ProductItem/ProductItemView.swift | 1 + .../Napzakmarket-iOS/Presentation/Home/View/HomeView.swift | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift index 4d5cd73..c5a3192 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift @@ -82,6 +82,7 @@ extension ProductItemView { .font(.napzakFont(.body6Medium14)) .applyNapzakTextStyle(napzakFontStyle: .body6Medium14) .foregroundStyle(Color.napzakGrayScale(.gray800)) + .lineLimit(1) HStack { if let isPriceNegotiable = product.isPriceNegotiable { if isPriceNegotiable { diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift index 2a566ef..6c7c403 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift @@ -52,7 +52,7 @@ struct HomeView: View { .padding(.trailing, 20) } - MostLikedProductsView(width: width, products: $buyProducts) + MostLikedProductsView(width: width, products: $sellProducts) } .padding(.top, 50) .padding(.horizontal, 20) @@ -93,8 +93,7 @@ extension HomeView { var body: some View { HStack() { Image(.imgLogo) - .padding(.top, 19) - .padding(.bottom, 15) + .padding(.vertical, 15) .padding(.leading, 20) Spacer() @@ -205,7 +204,6 @@ extension HomeView { ) } } - .background(Color.blue) } } } @@ -278,7 +276,6 @@ extension HomeView { ) } } - .background(Color.red) } } From 0639273407e0cd0d7a28ae9544ccd919616f8e40 Mon Sep 17 00:00:00 2001 From: joho2022 Date: Sat, 18 Jan 2025 03:01:22 +0900 Subject: [PATCH 09/14] =?UTF-8?q?[Chore]=20#33=20-=20=EC=BB=A8=EB=B2=A4?= =?UTF-8?q?=EC=85=98=20=ED=94=84=EB=A6=AC=EB=B7=B0=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Napzakmarket-iOS/Presentation/Home/View/HomeView.swift | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift index 6c7c403..6c45551 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift @@ -280,7 +280,3 @@ extension HomeView { } } - -#Preview { - HomeView() -} From 675b51c2e222abe8b26a7bee8efb8f682683363b Mon Sep 17 00:00:00 2001 From: joho2022 Date: Sat, 18 Jan 2025 03:06:20 +0900 Subject: [PATCH 10/14] =?UTF-8?q?[Chore]=20#33=20-=20svg=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/img_ready.imageset/Contents.json | 15 --------- .../Home/img_ready.imageset/img_ready.svg | 33 ------------------- 2 files changed, 48 deletions(-) delete mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/Contents.json delete mode 100644 Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/img_ready.svg diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/Contents.json b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/Contents.json deleted file mode 100644 index 45c5618..0000000 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/Contents.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "images" : [ - { - "filename" : "img_ready.svg", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - }, - "properties" : { - "preserves-vector-representation" : true - } -} diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/img_ready.svg b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/img_ready.svg deleted file mode 100644 index 4d7260a..0000000 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Resources/Assets.xcassets/Home/img_ready.imageset/img_ready.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From b5bda07495e4fca8462cc78bdedc500100bfa39b Mon Sep 17 00:00:00 2001 From: joho2022 Date: Sat, 18 Jan 2025 15:23:10 +0900 Subject: [PATCH 11/14] =?UTF-8?q?[Chore]=20#33=20-=20=EB=A7=88=EC=BC=93=20?= =?UTF-8?q?=EB=B0=8F=20=ED=83=90=EC=83=89=20=EC=83=81=ED=92=88=20=EC=95=84?= =?UTF-8?q?=EC=9D=B4=ED=85=9C=20=EB=8F=99=EC=A0=81=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=84=88=EB=B9=84=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Napzakmarket-iOS.xcodeproj/project.pbxproj | 4 ++-- .../Presentation/Market/View/MarketView.swift | 9 +++++---- .../Presentation/Search/View/SearchView.swift | 9 +++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Napzakmarket-iOS/Napzakmarket-iOS.xcodeproj/project.pbxproj b/Napzakmarket-iOS/Napzakmarket-iOS.xcodeproj/project.pbxproj index 0aaafef..b61653d 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS.xcodeproj/project.pbxproj +++ b/Napzakmarket-iOS/Napzakmarket-iOS.xcodeproj/project.pbxproj @@ -923,7 +923,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Napzakmarket-iOS/Application/Preview Content\""; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 9H57LB393L; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "Napzakmarket-iOS/Info.plist"; @@ -956,7 +956,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Napzakmarket-iOS/Application/Preview Content\""; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 9H57LB393L; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "Napzakmarket-iOS/Info.plist"; diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Market/View/MarketView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Market/View/MarketView.swift index 5d71e1a..b64a2bb 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Market/View/MarketView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Market/View/MarketView.swift @@ -16,10 +16,12 @@ struct MarketView: View { @State private var selectedIndex = 0 @State private var sellProducts = ProductModel.sellDummyList() @State private var buyProducts = ProductModel.buyDummyList() + + let width = (UIScreen.main.bounds.width - 55) / 2 private let columns = [ GridItem(.flexible(), spacing: 15), - GridItem(.flexible(), spacing: 15) + GridItem(.flexible()) ] var body: some View { @@ -77,7 +79,7 @@ struct MarketView: View { ProductItemView( product: product, isLikeButtonExist: false, - width: 160 + width: width ) } } else { @@ -85,12 +87,11 @@ struct MarketView: View { ProductItemView( product: product, isLikeButtonExist: false, - width: 160 + width: width ) } } } - .frame(height: 254) } .padding(.horizontal, 20) } diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift index b5781eb..6432183 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift @@ -15,11 +15,13 @@ struct SearchView: View { @State var sellProducts = ProductModel.sellDummyList() @State var buyProducts = ProductModel.buyDummyList() + let width = (UIScreen.main.bounds.width - 55) / 2 + //MARK: - Properties private let columns = [ GridItem(.flexible(), spacing: 15), - GridItem(.flexible(), spacing: 15) + GridItem(.flexible()) ] //MARK: - Main Body @@ -134,7 +136,7 @@ extension SearchView { ProductItemView( product: product, isLikeButtonExist: true, - width: 160 + width: width ) } } else if selectedIndex == 1 { @@ -142,12 +144,11 @@ extension SearchView { ProductItemView( product: product, isLikeButtonExist: true, - width: 160 + width: width ) } } } - .frame(height: 254) } } .padding(.horizontal, 20) From 06b7998912a66fb7c6fa9fba6de4b6690baba8e9 Mon Sep 17 00:00:00 2001 From: joho2022 Date: Sun, 19 Jan 2025 22:20:44 +0900 Subject: [PATCH 12/14] =?UTF-8?q?[Refactor]=20#33=20-=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EC=9E=90=20=EB=B3=B8=EC=9D=B8=20=EB=93=B1=EB=A1=9D=20=EC=83=81?= =?UTF-8?q?=ED=92=88=20=EC=A2=8B=EC=95=84=EC=9A=94=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=88=A8=EA=B9=80=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProductItem/ProductItemView.swift | 7 +- .../Components/ProductItem/ProductModel.swift | 79 +++++++++++++------ .../Presentation/Home/View/HomeView.swift | 2 - .../Presentation/Market/View/MarketView.swift | 36 ++++----- .../Presentation/Search/View/SearchView.swift | 58 +++++++------- 5 files changed, 102 insertions(+), 80 deletions(-) diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift index c5a3192..0cc80bd 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift @@ -18,7 +18,6 @@ struct ProductItemView: View { //MARK: - Properties - let isLikeButtonExist: Bool let width: CGFloat //MARK: - Main Body @@ -53,7 +52,7 @@ extension ProductItemView { .frame(width: 47, height: 27) } Spacer() - if isLikeButtonExist { + if product.isOwnedByCurrentUser { likeButton } } @@ -112,12 +111,12 @@ extension ProductItemView { price: "35,000원", uploadTime: "3시간 전", productType: .sell, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ) ProductItemView( product: mock, - isLikeButtonExist: false, width: 160 ) .frame(height: 254) diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductModel.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductModel.swift index 69e0e3e..d696f78 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductModel.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductModel.swift @@ -22,10 +22,11 @@ final class ProductModel: ObservableObject, Identifiable { let uploadTime: String let productType: ProductType let isPriceNegotiable: Bool? + let isOwnedByCurrentUser: Bool //MARK: - Init - init(id: Int, isLiked: Bool, genreName: String, productName: String, price: String, uploadTime: String, productType: ProductType, isPriceNegotiable: Bool?) { + init(id: Int, isLiked: Bool, genreName: String, productName: String, price: String, uploadTime: String, productType: ProductType, isPriceNegotiable: Bool?, isOwnedByCurrentUser: Bool) { self.id = id self.isLiked = isLiked self.genreName = genreName @@ -34,6 +35,7 @@ final class ProductModel: ObservableObject, Identifiable { self.uploadTime = uploadTime self.productType = productType self.isPriceNegotiable = isPriceNegotiable + self.isOwnedByCurrentUser = isOwnedByCurrentUser } } @@ -57,7 +59,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .sell, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: false ), ProductModel( id: 2, @@ -67,7 +70,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .sell, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: false ), ProductModel( id: 3, @@ -77,7 +81,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .sell, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ), ProductModel( id: 4, @@ -87,7 +92,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .sell, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: false ), ProductModel( id: 5, @@ -97,7 +103,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .sell, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: false ), ProductModel( id: 6, @@ -107,7 +114,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .sell, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ), ProductModel( id: 7, @@ -117,7 +125,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .sell, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ) ] } @@ -132,7 +141,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .buy, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ), ProductModel( id: 2, @@ -142,7 +152,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .buy, - isPriceNegotiable: true + isPriceNegotiable: true, + isOwnedByCurrentUser: true ), ProductModel( id: 3, @@ -152,7 +163,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .buy, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ), ProductModel( id: 4, @@ -162,7 +174,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .buy, - isPriceNegotiable: true + isPriceNegotiable: true, + isOwnedByCurrentUser: true ), ProductModel( id: 5, @@ -172,7 +185,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .buy, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ), ProductModel( id: 6, @@ -182,7 +196,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .buy, - isPriceNegotiable: true + isPriceNegotiable: true, + isOwnedByCurrentUser: true ), ProductModel( id: 7, @@ -192,7 +207,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .buy, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ), ProductModel( id: 8, @@ -202,7 +218,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .buy, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ), ProductModel( id: 9, @@ -212,7 +229,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .buy, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ) ] } @@ -227,7 +245,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .sell, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: false ), ProductModel( id: 2, @@ -237,7 +256,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .buy, - isPriceNegotiable: true + isPriceNegotiable: true, + isOwnedByCurrentUser: false ), ProductModel( id: 3, @@ -247,7 +267,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .sell, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: false ), ProductModel( id: 4, @@ -257,7 +278,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .buy, - isPriceNegotiable: true + isPriceNegotiable: true, + isOwnedByCurrentUser: true ), ProductModel( id: 5, @@ -267,7 +289,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .sell, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ), ProductModel( id: 6, @@ -277,7 +300,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .buy, - isPriceNegotiable: true + isPriceNegotiable: true, + isOwnedByCurrentUser: true ), ProductModel( id: 7, @@ -287,7 +311,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .sell, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ), ProductModel( id: 8, @@ -297,7 +322,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .buy, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ), ProductModel( id: 9, @@ -307,7 +333,8 @@ extension ProductModel { price: "35,000원", uploadTime: "3시간 전", productType: .sell, - isPriceNegotiable: false + isPriceNegotiable: false, + isOwnedByCurrentUser: true ) ] } diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift index 6c45551..c9e280c 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Home/View/HomeView.swift @@ -199,7 +199,6 @@ extension HomeView { product in ProductItemView( product: product, - isLikeButtonExist: false, width: width - 10 ) } @@ -271,7 +270,6 @@ extension HomeView { ForEach(products.prefix(4)) { product in ProductItemView( product: product, - isLikeButtonExist: true, width: width ) } diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Market/View/MarketView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Market/View/MarketView.swift index b64a2bb..19cd9d4 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Market/View/MarketView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Market/View/MarketView.swift @@ -10,7 +10,7 @@ import SwiftUI struct MarketView: View { @Environment(\.dismiss) private var dismiss @EnvironmentObject private var tabBarState: TabBarStateModel - + @State private var tags: [Tag] = MarketMockData.tags @State private var selectedIndex = 0 @@ -18,17 +18,17 @@ struct MarketView: View { @State private var buyProducts = ProductModel.buyDummyList() let width = (UIScreen.main.bounds.width - 55) / 2 - + private let columns = [ GridItem(.flexible(), spacing: 15), GridItem(.flexible()) ] - + var body: some View { VStack(spacing: 0) { navigationSection profileSection - + NZSegmentedControl( selectedIndex: $selectedIndex, tabs: ["팔아요", "구해요", "후기"], @@ -36,7 +36,7 @@ struct MarketView: View { ) .frame(height: 46) .padding(.top, 20) - + if selectedIndex == 2 { ReadyComponent() .navigationBarHidden(true) @@ -78,7 +78,6 @@ struct MarketView: View { ForEach(sellProducts) { product in ProductItemView( product: product, - isLikeButtonExist: false, width: width ) } @@ -86,7 +85,6 @@ struct MarketView: View { ForEach(buyProducts) { product in ProductItemView( product: product, - isLikeButtonExist: false, width: width ) } @@ -100,11 +98,11 @@ struct MarketView: View { .background(Color(.white)) .navigationBarHidden(true) .onAppear { - tabBarState.isTabBarHidden = true - } - .onDisappear { - tabBarState.isTabBarHidden = false - } + tabBarState.isTabBarHidden = true + } + .onDisappear { + tabBarState.isTabBarHidden = false + } } private var filterButtons: some View { @@ -117,7 +115,7 @@ struct MarketView: View { .frame(width: 67, height: 33) } .padding(.leading, 20) - + Button { print("품절 제외 필터 선택") } label: { @@ -140,13 +138,13 @@ struct MarketView: View { .frame(height: 53) .background(Color.napzakGrayScale(.gray50)) } - + private var navigationSection: some View { ZStack(alignment: .top) { Color.napzakGrayScale(.gray200) .edgesIgnoringSafeArea(.top) .frame(height: 138) - + HStack(alignment: .center, spacing: 0) { Spacer() Image("img_market_bg_character") @@ -154,7 +152,7 @@ struct MarketView: View { .frame(width: 138, height: 111, alignment: .trailing) .padding(.top, 27) } - + HStack { Button(action: { dismiss() @@ -162,14 +160,14 @@ struct MarketView: View { Image(systemName: "chevron.backward") .foregroundColor(Color.napzakGrayScale(.gray900)) .frame(width: 48, height: 48) - + } Spacer() } } .frame(maxWidth: .infinity) } - + private var profileSection: some View { VStack(spacing: 0) { Image("img_profile_md") @@ -197,7 +195,7 @@ struct MarketView: View { .foregroundStyle(Color.napzakGrayScale(.gray700)) } } - + private var tagListView: some View { HStack(spacing: 6) { ForEach(tags) { tag in diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift index 2e568a8..61891dc 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift @@ -133,7 +133,7 @@ extension SearchView { } } .padding(.leading, 20) - + Button { print("품절 제외 필터 선택") isSoldoutFilterOn.toggle() @@ -154,7 +154,7 @@ extension SearchView { } } Spacer() - + } .frame(height: 53) .background(Color.napzakGrayScale(.gray50)) @@ -193,49 +193,49 @@ extension SearchView { } } .frame(height: 56) - + LazyVGrid(columns: columns, spacing: 20) { - if selectedIndex == 0 { + if selectedTabIndex == 0 { ForEach(sellProducts) { product in ProductItemView( product: product, - isLikeButtonExist: true, width: width ) } - } else if selectedIndex == 1 { + } else if selectedTabIndex == 1 { ForEach(buyProducts) { product in ProductItemView( product: product, - isLikeButtonExist: true, width: width ) - .frame(height: 56) - .id("header") - - LazyVGrid(columns: columns, spacing: 20) { - if selectedTabIndex == 0 { - ForEach(sellProducts) { product in - ProductItemView( - product: product, - isLikeButtonExist: true - ) - } - } else if selectedTabIndex == 1 { - ForEach(buyProducts) { product in - ProductItemView( - product: product, - isLikeButtonExist: true - ) + } + .frame(height: 56) + .id("header") + + LazyVGrid(columns: columns, spacing: 20) { + if selectedTabIndex == 0 { + ForEach(sellProducts) { product in + ProductItemView( + product: product, + width: width + ) + } + } else if selectedTabIndex == 1 { + ForEach(buyProducts) { product in + ProductItemView( + product: product, + width: width + ) + } } } } } - } - .padding(.horizontal, 20) - .onChange(of: selectedTabIndex) { _ in - selectedSortOption = .latest - proxy.scrollTo("header", anchor: .top) + .padding(.horizontal, 20) + .onChange(of: selectedTabIndex) { _ in + selectedSortOption = .latest + proxy.scrollTo("header", anchor: .top) + } } } } From b1cb43b34f04d18de34e242f9f3cba563172c20a Mon Sep 17 00:00:00 2001 From: joho2022 Date: Sun, 19 Jan 2025 22:36:33 +0900 Subject: [PATCH 13/14] =?UTF-8?q?[Refactor]=20#33=20-=20=EA=B5=AC=ED=95=B4?= =?UTF-8?q?=EC=9A=94=20=EC=A4=91=EC=B2=A9=20=EA=B7=B8=EB=A6=AC=EB=93=9C=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Presentation/Search/View/SearchView.swift | 31 ++++--------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift index 61891dc..843d336 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Search/View/SearchView.swift @@ -193,6 +193,7 @@ extension SearchView { } } .frame(height: 56) + .id("header") LazyVGrid(columns: columns, spacing: 20) { if selectedTabIndex == 0 { @@ -209,33 +210,13 @@ extension SearchView { width: width ) } - .frame(height: 56) - .id("header") - - LazyVGrid(columns: columns, spacing: 20) { - if selectedTabIndex == 0 { - ForEach(sellProducts) { product in - ProductItemView( - product: product, - width: width - ) - } - } else if selectedTabIndex == 1 { - ForEach(buyProducts) { product in - ProductItemView( - product: product, - width: width - ) - } - } - } } } - .padding(.horizontal, 20) - .onChange(of: selectedTabIndex) { _ in - selectedSortOption = .latest - proxy.scrollTo("header", anchor: .top) - } + } + .padding(.horizontal, 20) + .onChange(of: selectedTabIndex) { _ in + selectedSortOption = .latest + proxy.scrollTo("header", anchor: .top) } } } From fc59487d58ce2727ba4b802484ed4cc2b37532a9 Mon Sep 17 00:00:00 2001 From: joho2022 Date: Sun, 19 Jan 2025 22:37:42 +0900 Subject: [PATCH 14/14] =?UTF-8?q?[Chore]=20#33=20-=20=EC=BB=A8=EB=B2=A4?= =?UTF-8?q?=EC=85=98=20Preview=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProductItem/ProductItemView.swift | 20 ------------------- .../Register/Components/RegisterGenre.swift | 4 ---- .../Presentation/Tabbar/View/TabBarView.swift | 4 ---- 3 files changed, 28 deletions(-) diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift index 0cc80bd..8271859 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Global/Components/ProductItem/ProductItemView.swift @@ -101,23 +101,3 @@ extension ProductItemView { .frame(width: width) } } - -#Preview { - let mock = ProductModel( - id: 1, - isLiked: true, - genreName: "산리오", - productName: "딸기 마이멜로디 마스코트 인형", - price: "35,000원", - uploadTime: "3시간 전", - productType: .sell, - isPriceNegotiable: false, - isOwnedByCurrentUser: true - ) - - ProductItemView( - product: mock, - width: 160 - ) - .frame(height: 254) -} diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Register/Components/RegisterGenre.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Register/Components/RegisterGenre.swift index 8488186..aaa4190 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Register/Components/RegisterGenre.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Register/Components/RegisterGenre.swift @@ -52,7 +52,3 @@ extension RegisterGenre { .overlay(Color.napzakGrayScale(.gray200)) } } - -#Preview { - TabBarView() -} diff --git a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Tabbar/View/TabBarView.swift b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Tabbar/View/TabBarView.swift index 35ab1c1..9910474 100644 --- a/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Tabbar/View/TabBarView.swift +++ b/Napzakmarket-iOS/Napzakmarket-iOS/Presentation/Tabbar/View/TabBarView.swift @@ -199,7 +199,3 @@ struct TabBarView: View { (selectedTab == index ? .caption1Bold12 : .caption3Medium12) } } - -#Preview { - TabBarView() -}