From b51ef4a090051445895e2106e1f3bfe840c364ab Mon Sep 17 00:00:00 2001 From: jeongdung-eo Date: Wed, 26 Jun 2024 18:30:39 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[Feat]=20#277=20-=20bubble=20builder=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/Bubble/BubbleBuilder.swift | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 GEON-PPANG-iOS/Core/DesignSystem/UIComponents/View/Bubble/BubbleBuilder.swift diff --git a/GEON-PPANG-iOS/Core/DesignSystem/UIComponents/View/Bubble/BubbleBuilder.swift b/GEON-PPANG-iOS/Core/DesignSystem/UIComponents/View/Bubble/BubbleBuilder.swift new file mode 100644 index 00000000..d7dd1314 --- /dev/null +++ b/GEON-PPANG-iOS/Core/DesignSystem/UIComponents/View/Bubble/BubbleBuilder.swift @@ -0,0 +1,74 @@ +// +// BubbleBuilder.swift +// GEON-PPANG-iOS +// +// Created by JEONGEUN KIM on 6/26/24. +// + +import UIKit +import SnapKit + +final class BubbleBuilder: Builder { + + private let view: UIView + private let imageView: UIImageView + private let button: UIButton + private let label: UILabel + + init() { + self.view = UIView() + self.imageView = UIImageView() + self.button = UIButton() + self.label = UILabel() + + setLayout() + setUI() + } + + private func setLayout() { + + self.view.snp.makeConstraints { + $0.size.equalTo(CGSize(width: 209, height: 36)) + } + + self.view.addSubview(imageView) + imageView.snp.makeConstraints { + $0.edges.equalTo(view.snp.edges).inset(0) + } + + self.view.addSubview(label) + label.snp.makeConstraints { + $0.leading.equalTo(imageView.snp.leading).inset(10) + $0.centerY.equalTo(imageView.snp.centerY).offset(3) + } + + self.view.addSubview(button) + button.snp.makeConstraints { + $0.leading.equalTo(label.snp.trailing).offset(4) + $0.centerY.equalTo(label.snp.centerY) + $0.size.equalTo(16) + } + } + + private func setUI() { + label.text = I18N.Home.bubbleTitle + label.font = .captionM2 + label.textColor = .gbbGray400 + + let action = UIAction { _ in self.view.removeFromSuperview() } + button.addAction(action, for: .touchUpInside) + button.setImage(.icDeleteKeyword, for: .normal) + } + + func build() -> UIView { + return self.view + } +} + +extension BubbleBuilder { + + func setImage(to image: UIImage) -> BubbleBuilder { + imageView.image = image + return self + } +} From c2dc2dda9b3b8a37ff43328d19a83c2cb1f6736f Mon Sep 17 00:00:00 2001 From: jeongdung-eo Date: Wed, 26 Jun 2024 18:30:53 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[Feat]=20#277=20-=20bubble=20director=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GEON-PPANG-iOS.xcodeproj/project.pbxproj | 16 +++++++++++++ .../View/Bubble/BubbleDirector.swift | 23 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 GEON-PPANG-iOS/Core/DesignSystem/UIComponents/View/Bubble/BubbleDirector.swift diff --git a/GEON-PPANG-iOS.xcodeproj/project.pbxproj b/GEON-PPANG-iOS.xcodeproj/project.pbxproj index 26c95b75..1f1296db 100644 --- a/GEON-PPANG-iOS.xcodeproj/project.pbxproj +++ b/GEON-PPANG-iOS.xcodeproj/project.pbxproj @@ -58,6 +58,8 @@ 095FB88A2AB36FCA00C69BD1 /* AnalyticManagerEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 095FB8892AB36FCA00C69BD1 /* AnalyticManagerEvent.swift */; }; 095FB88E2AB3703500C69BD1 /* AnalyticManagerEventProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 095FB88D2AB3703500C69BD1 /* AnalyticManagerEventProtocol.swift */; }; 0961C3642A501EBF0031A822 /* Strings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0961C3632A501EBF0031A822 /* Strings.swift */; }; + 096446372C2C064E00D5E85A /* BubbleBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 096446362C2C064E00D5E85A /* BubbleBuilder.swift */; }; + 096446392C2C065400D5E85A /* BubbleDirector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 096446382C2C065400D5E85A /* BubbleDirector.swift */; }; 097682DA2A5C829D0008F4FB /* GradientImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 097682D92A5C829D0008F4FB /* GradientImageView.swift */; }; 097682DC2A5C83910008F4FB /* CGFloat+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 097682DB2A5C83910008F4FB /* CGFloat+.swift */; }; 097682E32A5C95750008F4FB /* BakeryFilterCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 097682E22A5C95750008F4FB /* BakeryFilterCollectionViewCell.swift */; }; @@ -312,6 +314,8 @@ 095FB8892AB36FCA00C69BD1 /* AnalyticManagerEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticManagerEvent.swift; sourceTree = ""; }; 095FB88D2AB3703500C69BD1 /* AnalyticManagerEventProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticManagerEventProtocol.swift; sourceTree = ""; }; 0961C3632A501EBF0031A822 /* Strings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Strings.swift; sourceTree = ""; }; + 096446362C2C064E00D5E85A /* BubbleBuilder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BubbleBuilder.swift; sourceTree = ""; }; + 096446382C2C065400D5E85A /* BubbleDirector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BubbleDirector.swift; sourceTree = ""; }; 097682D92A5C829D0008F4FB /* GradientImageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GradientImageView.swift; sourceTree = ""; }; 097682DB2A5C83910008F4FB /* CGFloat+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGFloat+.swift"; sourceTree = ""; }; 097682E22A5C95750008F4FB /* BakeryFilterCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BakeryFilterCollectionViewCell.swift; sourceTree = ""; }; @@ -885,6 +889,15 @@ path = Storyboard; sourceTree = ""; }; + 096446352C2C063800D5E85A /* Bubble */ = { + isa = PBXGroup; + children = ( + 096446362C2C064E00D5E85A /* BubbleBuilder.swift */, + 096446382C2C065400D5E85A /* BubbleDirector.swift */, + ); + path = Bubble; + sourceTree = ""; + }; 097682D82A5C828E0008F4FB /* ImageView */ = { isa = PBXGroup; children = ( @@ -1158,6 +1171,7 @@ 3E2A0B822BE72373004F8D6B /* View */ = { isa = PBXGroup; children = ( + 096446352C2C063800D5E85A /* Bubble */, 0989547B2C1C07B30000D650 /* TextField */, 3E2A0B832BE74E49004F8D6B /* Chip */, ); @@ -2030,7 +2044,9 @@ 3EA69B5A2B557A52008AE23B /* AuthService.swift in Sources */, 3E23CCF52A8BD9950091957D /* UIView+.swift in Sources */, 3EA69B402B5579A1008AE23B /* ValidationAPI.swift in Sources */, + 096446392C2C065400D5E85A /* BubbleDirector.swift in Sources */, 3EA69B632B557A76008AE23B /* BookmarksService.swift in Sources */, + 096446372C2C064E00D5E85A /* BubbleBuilder.swift in Sources */, 3E06F8DB2A9E5759001302F4 /* AlertView.swift in Sources */, 3E36D7D62A8E6AF000B2C1CC /* FilterViewController.swift in Sources */, 3EA69BC72B59836B008AE23B /* KakaoService.swift in Sources */, diff --git a/GEON-PPANG-iOS/Core/DesignSystem/UIComponents/View/Bubble/BubbleDirector.swift b/GEON-PPANG-iOS/Core/DesignSystem/UIComponents/View/Bubble/BubbleDirector.swift new file mode 100644 index 00000000..01826ce9 --- /dev/null +++ b/GEON-PPANG-iOS/Core/DesignSystem/UIComponents/View/Bubble/BubbleDirector.swift @@ -0,0 +1,23 @@ +// +// BubbleDirector.swift +// GEON-PPANG-iOS +// +// Created by JEONGEUN KIM on 6/26/24. +// + +import UIKit + +public final class BubbleDirector { + + static func buildBubbleToRight() -> UIView { + BubbleBuilder() + .setImage(to: .imgRightBubble) + .build() + } + + static func buildBubbleToLeft() -> UIView { + BubbleBuilder() + .setImage(to: .imgLeftBubble) + .build() + } +} From e9aa6eb529c1fb25e8dcfc4040f9bb2b15ac99af Mon Sep 17 00:00:00 2001 From: jeongdung-eo Date: Wed, 26 Jun 2024 18:32:08 +0900 Subject: [PATCH 3/3] [Fix] #277 - package resolved --- .../xcshareddata/swiftpm/Package.resolved | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/GEON-PPANG-iOS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/GEON-PPANG-iOS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 5f8ee99d..6355ebd2 100644 --- a/GEON-PPANG-iOS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/GEON-PPANG-iOS.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/Alamofire/Alamofire.git", "state" : { - "revision" : "3dc6a42c7727c49bf26508e29b0a0b35f9c7e1ad", - "version" : "5.8.1" + "revision" : "f455c2975872ccd2d9c81594c658af65716e9b9a", + "version" : "5.9.1" } }, { @@ -15,7 +15,7 @@ "location" : "https://github.com/amplitude/Amplitude-iOS", "state" : { "branch" : "main", - "revision" : "82fc62448292c13fa0a6b0b11c4524df83fd3f3b" + "revision" : "bfdec453a31fd35942a619ef472fcf2f09e2313a" } }, { @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/kakao/kakao-ios-sdk", "state" : { - "revision" : "ae3c60cbd4e3b348775f8c766e5b908fa1e66c5a", - "version" : "2.20.0" + "revision" : "e9e649d3ba823c3673867d3d09010fc77005a940", + "version" : "2.22.3" } }, { @@ -41,8 +41,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/onevcat/Kingfisher.git", "state" : { - "revision" : "5b92f029fab2cce44386d28588098b5be0824ef5", - "version" : "7.11.0" + "revision" : "2ef543ee21d63734e1c004ad6c870255e8716c50", + "version" : "7.12.0" } }, { @@ -68,8 +68,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/ReactiveX/RxSwift.git", "state" : { - "revision" : "9dcaa4b333db437b0fbfaf453fad29069044a8b4", - "version" : "6.6.0" + "revision" : "b06a8c8596e4c3e8e7788e08e720e3248563ce6a", + "version" : "6.7.1" } }, { @@ -77,8 +77,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/getsentry/sentry-cocoa.git", "state" : { - "revision" : "b847a202a517a90763e8fd0656d8028aeee7b78d", - "version" : "8.20.0" + "revision" : "8fd4e804f2e72e0b9c1b189ce4e8349c4d10b6a2", + "version" : "8.30.0" } }, { @@ -86,8 +86,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/SnapKit/SnapKit", "state" : { - "revision" : "e74fe2a978d1216c3602b129447c7301573cc2d8", - "version" : "5.7.0" + "revision" : "2842e6e84e82eb9a8dac0100ca90d9444b0307f4", + "version" : "5.7.1" } }, {