From 8f151e7809de705f0bfb1a4ce3f5df5c438bdb1c Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Tue, 2 Sep 2025 23:52:34 +0900 Subject: [PATCH 01/15] =?UTF-8?q?fix/#173:=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=ED=99=9C=EC=84=B1=EC=8B=9C=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=BB=AC=EB=9F=AC=EA=B0=80=20=EC=A0=81=EC=9A=A9=EB=90=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8D=98=20=EB=AC=B8=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DesignSystem/Components/PPButton.swift | 16 +++++----------- .../DesignSystem/Extension/UIButton+.swift | 4 +++- .../SignUp/Step1/View/SignUpStep1View.swift | 11 ++++++++--- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPButton.swift b/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPButton.swift index 67151e7a..2c69ef38 100644 --- a/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPButton.swift +++ b/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPButton.swift @@ -73,14 +73,11 @@ public class PPButton: UIButton { ) { super.init(frame: .zero) - self.setTitleColor(buttonStyle.textColor, for: .normal) - self.setTitleColor(buttonStyle.disabledTextColor, for: .disabled) - self.setBackgroundColor(buttonStyle.backgroundColor, for: .normal) self.setBackgroundColor(buttonStyle.disabledBackgroundColor, for: .disabled) - self.setText(to: text, with: fontStyle, for: .normal) - self.setText(to: disabledText, with: fontStyle, for: .disabled) + self.setText(to: text, with: fontStyle, color: buttonStyle.textColor, for: .normal) + self.setText(to: disabledText, with: fontStyle, color: buttonStyle.disabledTextColor, for: .disabled) self.layer.cornerRadius = cornerRadius self.clipsToBounds = true @@ -90,7 +87,7 @@ public class PPButton: UIButton { public init( style: ButtonStyle, text: String, - disabledText: String = "", + disabledText: String = " ", font: UIFont? = .korFont(style: .medium, size: 16), cornerRadius: CGFloat = 4 ) { @@ -103,14 +100,11 @@ public class PPButton: UIButton { return } - self.setTitleColor(style.textColor, for: .normal) - self.setTitleColor(style.disabledTextColor, for: .disabled) - self.setBackgroundColor(style.backgroundColor, for: .normal) self.setBackgroundColor(style.disabledBackgroundColor, for: .disabled) - self.setText(to: text, with: PPFontStyle, for: .normal) - self.setText(to: disabledText, with: PPFontStyle, for: .disabled) + self.setText(to: text, with: PPFontStyle, color: style.textColor, for: .normal) + self.setText(to: disabledText, with: PPFontStyle, color: style.disabledTextColor, for: .disabled) self.layer.cornerRadius = cornerRadius self.clipsToBounds = true diff --git a/Poppool/PresentationLayer/DesignSystem/DesignSystem/Extension/UIButton+.swift b/Poppool/PresentationLayer/DesignSystem/DesignSystem/Extension/UIButton+.swift index d97038a7..b1897e08 100644 --- a/Poppool/PresentationLayer/DesignSystem/DesignSystem/Extension/UIButton+.swift +++ b/Poppool/PresentationLayer/DesignSystem/DesignSystem/Extension/UIButton+.swift @@ -5,6 +5,7 @@ public extension UIButton { func setText( to text: String = " ", with style: PPFontStyle, + color: UIColor = .g1000, for controlState: UIControl.State = .normal ) { let paragraphStyle = NSMutableParagraphStyle() @@ -17,7 +18,8 @@ public extension UIButton { attributes: [ .font: UIFont.PPFont(style: style), .paragraphStyle: paragraphStyle, - .baselineOffset: style.baseLineOffset + .baselineOffset: style.baseLineOffset, + .foregroundColor: color ] ) diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpStep1View.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpStep1View.swift index c7b46b7e..9e72ea2a 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpStep1View.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpStep1View.swift @@ -3,6 +3,7 @@ import UIKit import DesignSystem import SnapKit +import Then final class SignUpStep1View: UIView { @@ -29,9 +30,13 @@ final class SignUpStep1View: UIView { return view }() - let completeButton: PPButton = { - return PPButton(style: .primary, text: "확인", disabledText: "확인") - }() + let completeButton = PPButton( + buttonStyle: .primary, + text: "확인", + disabledText: "확인" + ).then { + $0.isEnabled = false + } // MARK: - init init() { From 1880737eff3f0eaaae6c32a20375df9d7e2ed8e7 Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Wed, 3 Sep 2025 00:11:07 +0900 Subject: [PATCH 02/15] =?UTF-8?q?feat/#173:=20=EB=B0=91=EC=A4=84=20?= =?UTF-8?q?=ED=85=8D=EC=8A=A4=ED=8A=B8=20=EB=B2=84=ED=8A=BC=20=EA=B3=B5?= =?UTF-8?q?=ED=86=B5=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/PPUnderlinedTextButton.swift | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPUnderlinedTextButton.swift diff --git a/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPUnderlinedTextButton.swift b/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPUnderlinedTextButton.swift new file mode 100644 index 00000000..872349a5 --- /dev/null +++ b/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPUnderlinedTextButton.swift @@ -0,0 +1,44 @@ +import UIKit + +import SnapKit + +public final class PPUnderlinedTextButton: UIButton { + + public init( + text: String = " ", + font: PPFontStyle = .KOr16, + color: UIColor = .g1000, + for controlState: UIControl.State = .normal + ) { + super.init(frame: .zero) + + self.setText(to: text, with: font, color: color, for: controlState) + + self.addViews() + self.setupConstraints() + } + + required init?(coder: NSCoder) { + fatalError("\(#file), \(#function) Error") + } + + private let UnderlineView = UIView().then { + $0.backgroundColor = .g1000 + } +} + +extension PPUnderlinedTextButton { + func addViews() { + [UnderlineView].forEach { + self.addSubview($0) + } + } + + func setupConstraints() { + UnderlineView.snp.makeConstraints { make in + make.height.equalTo(1) + make.bottom.equalToSuperview() + make.horizontalEdges.equalToSuperview() + } + } +} From 051e802cfd9a597c9c249277501481026ef7fd2d Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Wed, 3 Sep 2025 00:41:11 +0900 Subject: [PATCH 03/15] =?UTF-8?q?feat/#173:=20=EB=B0=91=EC=A4=84=20?= =?UTF-8?q?=ED=85=8D=EC=8A=A4=ED=8A=B8=20=EB=B2=84=ED=8A=BC=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EA=B5=AC=ED=98=84=20=EB=B0=8F=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/PPUnderlinedTextButton.swift | 29 ++++++++++++++----- .../Component/TagCollectionHeaderView.swift | 16 +--------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPUnderlinedTextButton.swift b/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPUnderlinedTextButton.swift index 872349a5..fb70abb0 100644 --- a/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPUnderlinedTextButton.swift +++ b/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPUnderlinedTextButton.swift @@ -4,15 +4,22 @@ import SnapKit public final class PPUnderlinedTextButton: UIButton { + private let textColor: UIColor = .g1000 + private let disabledTextColor: UIColor = .g300 + + private let UnderlineView = UIView().then { + $0.backgroundColor = .g1000 + } + public init( - text: String = " ", - font: PPFontStyle = .KOr16, - color: UIColor = .g1000, - for controlState: UIControl.State = .normal + fontStyle: PPFontStyle = .KOm16, + text: String, + disabledText: String = "", ) { super.init(frame: .zero) - self.setText(to: text, with: font, color: color, for: controlState) + self.setText(to: text, with: fontStyle, color: textColor, for: .normal) + self.setText(to: disabledText.isEmpty ? text : disabledText, with: fontStyle, color: disabledTextColor, for: .disabled) self.addViews() self.setupConstraints() @@ -22,8 +29,16 @@ public final class PPUnderlinedTextButton: UIButton { fatalError("\(#file), \(#function) Error") } - private let UnderlineView = UIView().then { - $0.backgroundColor = .g1000 + override public func layoutSubviews() { + super.layoutSubviews() + + switch state { + case .normal: + UnderlineView.backgroundColor = textColor + case .disabled: + UnderlineView.backgroundColor = disabledTextColor + default: break + } } } diff --git a/Poppool/PresentationLayer/SearchFeature/SearchFeature/Common/View/Component/TagCollectionHeaderView.swift b/Poppool/PresentationLayer/SearchFeature/SearchFeature/Common/View/Component/TagCollectionHeaderView.swift index 93f9c5d0..a6a1fff1 100644 --- a/Poppool/PresentationLayer/SearchFeature/SearchFeature/Common/View/Component/TagCollectionHeaderView.swift +++ b/Poppool/PresentationLayer/SearchFeature/SearchFeature/Common/View/Component/TagCollectionHeaderView.swift @@ -12,14 +12,10 @@ final class TagCollectionHeaderView: UICollectionReusableView { private let sectionTitleLabel = PPLabel(text: "최근 검색어", style: .KOb16) - let removeAllButton = UIButton().then { + let removeAllButton = PPUnderlinedTextButton(fontStyle: .KOr13, text: "모두삭제").then { $0.isHidden = true - $0.setText(to: "모두삭제", with: .KOr13) } - private let removeAllButtonUnderline = UIView().then { - $0.backgroundColor = .g1000 - } // MARK: - init override init(frame: CGRect) { @@ -45,10 +41,6 @@ private extension TagCollectionHeaderView { [sectionTitleLabel, removeAllButton].forEach { self.addSubview($0) } - - [removeAllButtonUnderline].forEach { - removeAllButton.addSubview($0) - } } func setupConstraints() { @@ -63,12 +55,6 @@ private extension TagCollectionHeaderView { make.centerY.equalTo(sectionTitleLabel) make.height.equalTo(20) } - - removeAllButtonUnderline.snp.makeConstraints { make in - make.height.equalTo(1) - make.bottom.equalToSuperview() - make.horizontalEdges.equalToSuperview() - } } } From 2e9519be8995a947a3c68ffc25aeed682be97dc0 Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Wed, 3 Sep 2025 00:41:36 +0900 Subject: [PATCH 04/15] =?UTF-8?q?feat/#173:=20attr=20=ED=85=8D=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=BB=AC=EB=9F=AC=20=EB=B3=80=EA=B2=BD=20=EB=A9=94?= =?UTF-8?q?=EC=84=9C=EB=93=9C=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DesignSystem/Extension/UILabel+.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Poppool/PresentationLayer/DesignSystem/DesignSystem/Extension/UILabel+.swift b/Poppool/PresentationLayer/DesignSystem/DesignSystem/Extension/UILabel+.swift index e30c16b7..dac994f3 100644 --- a/Poppool/PresentationLayer/DesignSystem/DesignSystem/Extension/UILabel+.swift +++ b/Poppool/PresentationLayer/DesignSystem/DesignSystem/Extension/UILabel+.swift @@ -31,6 +31,18 @@ public extension UILabel { self.attributedText = NSAttributedString(string: text ?? " ", attributes: attributes) } + /// 기존 attributed 속성을 유지하면서 텍스트 컬러만 변경합니다. + func updateTextColor(to color: UIColor?) { + if let current = self.attributedText, current.length > 0 { + let mutable = NSMutableAttributedString(attributedString: current) + let fullRange = NSRange(location: 0, length: mutable.length) + mutable.addAttribute(.foregroundColor, value: color ?? .g1000, range: fullRange) + self.attributedText = mutable + } else { + self.textColor = color + } + } + /// Style이 포함된 텍스트를 적용합니다. func setText(to text: String?, with style: PPFontStyle) { let paragraphStyle = NSMutableParagraphStyle() From 3d083ec2008ce272e8ece43d30d8b868122035af Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Wed, 3 Sep 2025 00:41:49 +0900 Subject: [PATCH 05/15] =?UTF-8?q?fix/#173:=20=ED=85=8D=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Step1/View/SignUpCheckBoxButton.swift | 4 +- .../SignUp/Step1/View/SignUpStep1View.swift | 11 +-- .../SignUp/Step1/View/SignUpTermsView.swift | 8 +-- .../SignUp/Step2/SignUpStep2Controller.swift | 10 +-- .../Scene/SignUp/Step2/SignUpStep2View.swift | 69 +++++-------------- 5 files changed, 32 insertions(+), 70 deletions(-) diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpCheckBoxButton.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpCheckBoxButton.swift index 064b423f..b8f17e32 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpCheckBoxButton.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpCheckBoxButton.swift @@ -15,9 +15,7 @@ final class SignUpCheckBoxButton: UIView { return view }() - private let buttonLabel: PPLabel = { - return PPLabel(style: .bold, fontSize: 15, text: "약관에 모두 동의할게요") - }() + private let buttonLabel = PPLabel(text: "약관에 모두 동의할게요", style: .KOb15) let button: UIButton = { return UIButton() diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpStep1View.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpStep1View.swift index 9e72ea2a..9e7e710b 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpStep1View.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpStep1View.swift @@ -8,11 +8,12 @@ import Then final class SignUpStep1View: UIView { // MARK: - Components - private let titleLabel: PPLabel = { - let label = PPLabel(style: .bold, fontSize: 20, text: "서비스 이용을 위한\n약관을 확인해주세요") - label.numberOfLines = 0 - return label - }() + private let titleLabel = PPLabel( + text: "서비스 이용을 위한\n약관을 확인해주세요", + style: .KOb20 + ).then { + $0.numberOfLines = 0 + } let totalButton: SignUpCheckBoxButton = { return SignUpCheckBoxButton() diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpTermsView.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpTermsView.swift index 03a16047..f4209102 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpTermsView.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpTermsView.swift @@ -15,11 +15,7 @@ final class SignUpTermsView: UIView { return view }() - private let titleLabel: PPLabel = { - let label = PPLabel(style: .regular, fontSize: 14) - label.text = "some" - return label - }() + private let titleLabel = PPLabel(style: .KOr14) let righticonButton: UIButton = { let view = UIButton() @@ -40,7 +36,7 @@ final class SignUpTermsView: UIView { super.init(frame: .zero) setUpConstraints() bind() - titleLabel.text = title + titleLabel.updateText(to: title) } required init?(coder: NSCoder) { diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step2/SignUpStep2Controller.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step2/SignUpStep2Controller.swift index 8aefa684..619497d4 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step2/SignUpStep2Controller.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step2/SignUpStep2Controller.swift @@ -91,8 +91,8 @@ extension SignUpStep2Controller { // border, text, textColor set owner.mainView.textFieldTrailingView.layer.borderColor = state.nickNameState.borderColor?.cgColor - owner.mainView.textDescriptionLabel.text = state.nickNameState.description - owner.mainView.textDescriptionLabel.textColor = state.nickNameState.textColor + owner.mainView.textDescriptionLabel.updateText(to: state.nickNameState.description) + owner.mainView.textDescriptionLabel.updateTextColor(to: state.nickNameState.textColor) // clearButton, Duplicated Button set owner.mainView.duplicatedCheckButton.isHidden = state.nickNameState.isHiddenCheckButton @@ -100,14 +100,14 @@ extension SignUpStep2Controller { // count Label set if let nickName = state.nickName { - owner.mainView.textCountLabel.text = "\(nickName.count) / 10자" + owner.mainView.textCountLabel.updateText(to: "\(nickName.count) / 10자") if nickName.count > 10 { owner.mainView.textFieldTrailingView.shake() } } switch state.nickNameState { case .duplicated, .duplicatedActive, .korAndEng, .korAndEngActive, .length, .lengthActive: - owner.mainView.textCountLabel.textColor = .re500 + owner.mainView.textCountLabel.updateTextColor(to: .re500) default: - owner.mainView.textCountLabel.textColor = .g500 + owner.mainView.textCountLabel.updateTextColor(to: .g500) } // completeButton isActive set diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step2/SignUpStep2View.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step2/SignUpStep2View.swift index 9626eac2..1861882c 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step2/SignUpStep2View.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step2/SignUpStep2View.swift @@ -3,27 +3,22 @@ import UIKit import DesignSystem import SnapKit +import Then final class SignUpStep2View: UIView { // MARK: - Components - private let titleLabel: PPLabel = { - let label = PPLabel(style: .bold, fontSize: 20, text: "팝풀에서 사용할\n별명을 설정해볼까요?") - label.numberOfLines = 0 - return label - }() + private let titleLabel = PPLabel(text: "팝풀에서 사용할\n별명을 설정해볼까요?", style: .KOb20).then { + $0.numberOfLines = 0 + } - private let descriptionLabel: PPLabel = { - let label = PPLabel(style: .regular, fontSize: 15, text: "이후 이 별명으로 팝풀에서 활동할 예정이에요.") - label.textColor = .g600 - return label - }() + private let descriptionLabel = PPLabel(text: "이후 이 별명으로 팝풀에서 활동할 예정이에요.", style: .KOr15).then { + $0.textColor = .g600 + } - let completeButton: PPButton = { - let button = PPButton(style: .primary, text: "확인", disabledText: "다음") - button.isEnabled = false - return button - }() + let completeButton = PPButton(buttonStyle: .primary, text: "확인", disabledText: "다음").then { + $0.isEnabled = false + } let textFieldTrailingView: UIStackView = { let view = UIStackView() @@ -50,44 +45,13 @@ final class SignUpStep2View: UIView { return button }() - let textDescriptionLabel: PPLabel = { - let label = PPLabel(style: .regular, fontSize: 12) - label.text = "temptemp" - return label - }() + let textDescriptionLabel = PPLabel(style: .KOr12) - let textCountLabel: PPLabel = { - let label = PPLabel(style: .regular, fontSize: 12) - label.text = "0/10자" - label.textColor = .g500 - return label - }() + let textCountLabel = PPLabel(text: "0/10자", style: .KOr12).then { + $0.textColor = .g500 + } - let duplicatedCheckButton: UIButton = { - let button = UIButton() - let title = "중복체크" - // 밑줄 및 폰트 스타일 설정 - let attributedTitle = NSAttributedString( - string: title, - attributes: [ - .font: UIFont.korFont(style: .regular, size: 13), // 폰트 - .underlineStyle: NSUnderlineStyle.single.rawValue, // 밑줄 스타일 - .foregroundColor: UIColor.g1000 // 텍스트 색상 - ] - ) - let disabledAttributedTitle = NSAttributedString( - string: title, - attributes: [ - .font: UIFont.korFont(style: .regular, size: 13), // 폰트 - .underlineStyle: NSUnderlineStyle.single.rawValue, // 밑줄 스타일 - .foregroundColor: UIColor.g300 // 텍스트 색상 - ] - ) - // 버튼에 Attributed Title 적용 - button.setAttributedTitle(attributedTitle, for: .normal) - button.setAttributedTitle(disabledAttributedTitle, for: .disabled) - return button - }() + let duplicatedCheckButton = PPUnderlinedTextButton(fontStyle: .KOr13, text: "중복체크") // MARK: - init init() { @@ -126,6 +90,9 @@ private extension SignUpStep2View { textFieldTrailingView.addArrangedSubview(textField) textFieldTrailingView.addArrangedSubview(duplicatedCheckButton) textFieldTrailingView.addArrangedSubview(clearButton) + duplicatedCheckButton.snp.makeConstraints { make in + make.height.equalTo(20) + } clearButton.snp.makeConstraints { make in make.size.equalTo(16) } From 2caee41c00a810045d42210c9acd69e5be00260a Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Wed, 3 Sep 2025 01:40:48 +0900 Subject: [PATCH 06/15] =?UTF-8?q?fix/#173:=20=ED=85=8D=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SignUpCompleteController.swift | 11 ++-- .../SignUpComplete/SignUpCompleteView.swift | 27 ++++----- .../SignUp/Step3/View/SignUpStep3View.swift | 37 +++---------- .../View/TagSection/TagSectionCell.swift | 10 ++-- .../AgeSelectedModal/AgeSelectedView.swift | 6 +- .../Step4/Main/View/AgeSelectedButton.swift | 27 ++++----- .../Step4/Main/View/SignUpStep4View.swift | 55 ++++++------------- .../TermsDetail/TermsDetailController.swift | 2 +- .../SignUp/TermsDetail/TermsDetailView.swift | 2 +- 9 files changed, 61 insertions(+), 116 deletions(-) diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/SignUpComplete/SignUpCompleteController.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/SignUpComplete/SignUpCompleteController.swift index c76da8a8..02728d1a 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/SignUpComplete/SignUpCompleteController.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/SignUpComplete/SignUpCompleteController.swift @@ -50,15 +50,14 @@ extension SignUpCompleteController { reactor.state .withUnretained(self) .subscribe { (owner, state) in + owner.mainView.nickNameLabel.updateText(to: state.nickName) + let paragraphStyle = NSMutableParagraphStyle() paragraphStyle.lineHeightMultiple = 1.3 paragraphStyle.alignment = .center - owner.mainView.nickNameLabel.attributedText = NSMutableAttributedString( - string: state.nickName, - attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle] - ) - let categoryString = state.categoryTitles.enumerated() - .map { "#\($0.element)" } + + let categoryString = state.categoryTitles + .map { "#\($0)" } .joined(separator: ", ") let attributedText = NSMutableAttributedString( diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/SignUpComplete/SignUpCompleteView.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/SignUpComplete/SignUpCompleteView.swift index b89f2ffa..0bdff0b1 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/SignUpComplete/SignUpCompleteView.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/SignUpComplete/SignUpCompleteView.swift @@ -3,6 +3,7 @@ import UIKit import DesignSystem import SnapKit +import Then final class SignUpCompleteView: UIView { @@ -13,27 +14,19 @@ final class SignUpCompleteView: UIView { return view }() - private let titleTopLabel: PPLabel = { - return PPLabel(style: .bold, fontSize: 20, text: "가입완료") - }() + private let titleTopLabel = PPLabel(text: "가입완료", style: .KOb20) private let titleMiddleStackView: UIStackView = { return UIStackView() }() - let nickNameLabel: PPLabel = { - let label = PPLabel(style: .bold, fontSize: 20) - label.textColor = .blu500 - return label - }() + let nickNameLabel = PPLabel(style: .KOb20).then { + $0.updateTextColor(to: .blu500) + } - private let nickNameSubLabel: PPLabel = { - return PPLabel(style: .bold, fontSize: 20, text: "님의") - }() + private let nickNameSubLabel = PPLabel(text: "님의", style: .KOb20) - private let titleBottomLabel: PPLabel = { - return PPLabel(style: .bold, fontSize: 20, text: "피드를 확인해보세요") - }() + private let titleBottomLabel = PPLabel(text: "피드를 확인해보세요", style: .KOb20) private let titleStackView: UIStackView = { let view = UIStackView() @@ -43,8 +36,8 @@ final class SignUpCompleteView: UIView { }() let descriptionLabel: PPLabel = { - let label = PPLabel(style: .bold, fontSize: 15) - label.textColor = .g600 + let label = PPLabel(style: .KOb15) + label.updateTextColor(to: .g600) label.numberOfLines = 0 label.lineBreakMode = .byWordWrapping label.textAlignment = .center @@ -52,7 +45,7 @@ final class SignUpCompleteView: UIView { }() let bottomButton: PPButton = { - return PPButton(style: .primary, text: "바로가기") + return PPButton(buttonStyle: .primary, text: "바로가기") }() // MARK: - init diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step3/View/SignUpStep3View.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step3/View/SignUpStep3View.swift index 5388a368..dc186d79 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step3/View/SignUpStep3View.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step3/View/SignUpStep3View.swift @@ -7,36 +7,17 @@ import SnapKit final class SignUpStep3View: UIView { // MARK: - Components - let nickNameLabel: PPLabel = { - let label = PPLabel(style: .bold, fontSize: 20) - label.textColor = .blu500 - label.text = "하이" - return label - }() + let nickNameLabel = PPLabel(style: .KOb20).then { + $0.updateTextColor(to: .blu500) + } - private let titleTopLabel: PPLabel = { - let label = PPLabel(style: .bold, fontSize: 20) - label.text = "님에 대해" - return label - }() + private let titleTopLabel = PPLabel(text: "님에 대해", style: .KOb20) - private let titleBottomLabel: PPLabel = { - let label = PPLabel(style: .bold, fontSize: 20) - label.text = "조금 더 알려주시겠어요?" - return label - }() + private let titleBottomLabel = PPLabel(text: "조금 더 알려주시겠어요?", style: .KOb20) - private let subTitleLabel: PPLabel = { - let label = PPLabel(style: .bold, fontSize: 16) - label.text = "관심이 있는 카테고리를 선택해주세요" - return label - }() + private let subTitleLabel = PPLabel(text: "관심이 있는 카테고리를 선택해주세요", style: .KOb16) - private let subTitleDescriptionLabel: PPLabel = { - let label = PPLabel(style: .regular, fontSize: 12) - label.text = "최대 5개까지 선택할 수 있어요." - return label - }() + private let subTitleDescriptionLabel = PPLabel(text: "최대 5개까지 선택할 수 있어요.", style: .KOr12) let categoryCollectionView: UICollectionView = { let view = UICollectionView(frame: .zero, collectionViewLayout: .init()) @@ -45,11 +26,11 @@ final class SignUpStep3View: UIView { }() let skipButton: PPButton = { - return PPButton(style: .secondary, text: "건너뛰기") + return PPButton(buttonStyle: .secondary, text: "건너뛰기") }() let completeButton: PPButton = { - return PPButton(style: .primary, text: "다음", disabledText: "다음") + return PPButton(buttonStyle: .primary, text: "다음", disabledText: "다음") }() private let buttonStackView: UIStackView = { diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step3/View/TagSection/TagSectionCell.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step3/View/TagSection/TagSectionCell.swift index e4c1f754..762f1bf0 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step3/View/TagSection/TagSectionCell.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step3/View/TagSection/TagSectionCell.swift @@ -9,7 +9,7 @@ final class TagSectionCell: UICollectionViewCell { // MARK: - Components private let titleLabel: PPLabel = { - return PPLabel(style: .medium, fontSize: 13) + return PPLabel(style: .KOm13) }() let disposeBag = DisposeBag() @@ -48,17 +48,15 @@ extension TagSectionCell: Inputable { } func injection(with input: Input) { - titleLabel.text = input.title + titleLabel.updateText(to: input.title) if input.isSelected { contentView.backgroundColor = .blu500 contentView.layer.borderWidth = 0 - titleLabel.textColor = .w100 - titleLabel.font = . korFont(style: .medium, size: 13) + titleLabel.updateTextColor(to: .w100) } else { contentView.backgroundColor = .clear contentView.layer.borderWidth = 1 - titleLabel.textColor = .g400 - titleLabel.font = . korFont(style: .medium, size: 13) + titleLabel.updateTextColor(to: .g400) } } } diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step4/AgeSelectedModal/AgeSelectedView.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step4/AgeSelectedModal/AgeSelectedView.swift index fbb5cabe..f5b85369 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step4/AgeSelectedModal/AgeSelectedView.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step4/AgeSelectedModal/AgeSelectedView.swift @@ -8,7 +8,7 @@ final class AgeSelectedView: UIView { // MARK: - Components private let titleLabel: PPLabel = { - return PPLabel(style: .bold, fontSize: 18, text: "나이를 선택해주세요") + return PPLabel(text: "나이를 선택해주세요", style: .KOb18) }() let picker: PPPicker = { @@ -17,11 +17,11 @@ final class AgeSelectedView: UIView { }() let cancelButton: PPButton = { - return PPButton(style: .secondary, text: "취소") + return PPButton(buttonStyle: .secondary, text: "취소") }() let completeButton: PPButton = { - return PPButton(style: .primary, text: "확인", disabledText: "확인") + return PPButton(buttonStyle: .primary, text: "확인") }() private let buttonStackView: UIStackView = { diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step4/Main/View/AgeSelectedButton.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step4/Main/View/AgeSelectedButton.swift index ac5bf151..0ce4dea2 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step4/Main/View/AgeSelectedButton.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step4/Main/View/AgeSelectedButton.swift @@ -3,6 +3,7 @@ import UIKit import DesignSystem import SnapKit +import Then final class AgeSelectedButton: UIView { @@ -13,11 +14,9 @@ final class AgeSelectedButton: UIView { return view }() - private let defaultLabel: PPLabel = { - let label = PPLabel(style: .medium, fontSize: 14, text: "나이를 선택해주세요") - label.textColor = .g400 - return label - }() + private let defaultLabel = PPLabel(text: "나이를 선택해주세요", style: .KOm14).then { + $0.textColor = .g400 + } private let rightImageView: UIImageView = { let view = UIImageView() @@ -25,17 +24,13 @@ final class AgeSelectedButton: UIView { return view }() - private let ageTitleLabel: PPLabel = { - let label = PPLabel(style: .medium, fontSize: 11, text: "나이") - label.textColor = .g400 - return label - }() + private let ageTitleLabel = PPLabel(text: "나이", style: .KOm11).then { + $0.textColor = .g400 + } - private let ageLabel: PPLabel = { - let label = PPLabel(style: .medium, fontSize: 14, text: "") - label.textColor = .g1000 - return label - }() + private let ageLabel = PPLabel(style: .KOm14).then { + $0.textColor = .g1000 + } private let verticalStackView: UIStackView = { let view = UIStackView() @@ -99,7 +94,7 @@ extension AgeSelectedButton: Inputable { func injection(with input: Input) { if let age = input.age { verticalStackView.isHidden = false - ageLabel.text = "\(age)세" + ageLabel.updateText(to: "\(age)세") defaultLabel.isHidden = true } else { verticalStackView.isHidden = true diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step4/Main/View/SignUpStep4View.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step4/Main/View/SignUpStep4View.swift index a7d8df1d..bd3b74cc 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step4/Main/View/SignUpStep4View.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step4/Main/View/SignUpStep4View.swift @@ -3,46 +3,24 @@ import UIKit import DesignSystem import SnapKit +import Then final class SignUpStep4View: UIView { // MARK: - Components - let nickNameLabel: PPLabel = { - let label = PPLabel(style: .bold, fontSize: 20) - label.textColor = .blu500 - label.text = "하이" - return label - }() + private let nickNameLabel = PPLabel(style: .KOb20).then { + $0.updateTextColor(to: .blu500) + } - private let titleTopLabel: PPLabel = { - let label = PPLabel(style: .bold, fontSize: 20) - label.text = "님에 대해" - return label - }() + private let titleTopLabel = PPLabel(text: "님에 대해", style: .KOb20) - private let titleBottomLabel: PPLabel = { - let label = PPLabel(style: .bold, fontSize: 20) - label.text = "조금 더 알려주시겠어요?" - return label - }() + private let titleBottomLabel = PPLabel(text: "조금 더 알려주시겠어요?", style: .KOb20) - private let subTitleLabel: PPLabel = { - let label = PPLabel(style: .bold, fontSize: 16) - label.text = "해당되시는 성별 / 나이대를 알려주세요" - return label - }() + private let subTitleLabel = PPLabel(text: "해당되시는 성별 / 나이대를 알려주세요", style: .KOb16) - private let subTitleDescriptionLabel: PPLabel = { - let label = PPLabel(style: .regular, fontSize: 12) - label.text = "가장 잘 맞는 팝업스토어를 소개해드릴게요." - return label - }() + private let subTitleDescriptionLabel = PPLabel(text: "가장 잘 맞는 팝업스토어를 소개해드릴게요.", style: .KOr12) - private let genderTitleLabel: PPLabel = { - let label = PPLabel(style: .regular, fontSize: 13) - label.text = "성별" - return label - }() + private let genderTitleLabel = PPLabel(text: "성별", style: .KOr13) let genderSegmentControl: PPSegmentedControl = { return PPSegmentedControl( @@ -52,22 +30,18 @@ final class SignUpStep4View: UIView { ) }() - private let ageTitleLabel: PPLabel = { - let label = PPLabel(style: .regular, fontSize: 13) - label.text = "나이" - return label - }() + private let ageTitleLabel = PPLabel(text: "나이", style: .KOr13) let ageSelectedButton: AgeSelectedButton = { return AgeSelectedButton() }() let skipButton: PPButton = { - return PPButton(style: .secondary, text: "건너뛰기") + return PPButton(buttonStyle: .secondary, text: "건너뛰기") }() let completeButton: PPButton = { - return PPButton(style: .primary, text: "확인", disabledText: "확인") + return PPButton(buttonStyle: .primary, text: "확인", disabledText: "확인") }() private let buttonStackView: UIStackView = { @@ -87,6 +61,11 @@ final class SignUpStep4View: UIView { fatalError("init(coder:) has not been implemented") } + // FIXME: 회원 가입 과정에서 너무 많은 호출을 하고 있는 문제 수정 + /// 원래라면 attr을 유지하는 updateText 메서드를 이용해야 스타일이 유지되는데 + /// 여기는 오히려 text에 주입을 해줘야 스타일이 유지되고 있음 + /// 아마 다회 호출하는 과정에서 스타일 처리에 문제가 발생하는게 아닌가 싶음 + /// step3에 동일한 메서드 있으니 수정시 같이 수정 func setNickName(nickName: String?) { nickNameLabel.text = nickName } diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/TermsDetail/TermsDetailController.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/TermsDetail/TermsDetailController.swift index 818b7eea..117c87e7 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/TermsDetail/TermsDetailController.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/TermsDetail/TermsDetailController.swift @@ -24,7 +24,7 @@ final class TermsDetailController: BaseViewController { ] mainView.contentTextView.attributedText = NSAttributedString(string: content ?? "", attributes: attributes) - mainView.titleLabel.text = title + mainView.titleLabel.updateText(to: title) } diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/TermsDetail/TermsDetailView.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/TermsDetail/TermsDetailView.swift index 75772762..22928ef2 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/TermsDetail/TermsDetailView.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/TermsDetail/TermsDetailView.swift @@ -8,7 +8,7 @@ final class TermsDetailView: UIView { // MARK: - Components let titleLabel: PPLabel = { - return PPLabel(style: .bold, fontSize: 15) + return PPLabel(style: .KOb15) }() let contentTextView: UITextView = { From fa6ec39a53ea2f1297b396464890704aaa155879 Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Wed, 3 Sep 2025 02:36:07 +0900 Subject: [PATCH 07/15] =?UTF-8?q?feat/#173:=20=EB=A1=9C=EA=B7=B8=EC=95=84?= =?UTF-8?q?=EC=9B=83,=20=ED=9A=8C=EC=9B=90=ED=83=88=ED=87=B4=20=EC=8B=9C?= =?UTF-8?q?=EC=A0=90=EC=97=90=20=ED=82=A4=EC=B2=B4=EC=9D=B8=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=ED=86=A0=ED=81=B0=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Presentation/Scene/MyPage/Main/MyPageReactor.swift | 3 +++ .../Withdrawl/SelectedReason/WithdrawlReasonReactor.swift | 1 + 2 files changed, 4 insertions(+) diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/MyPage/Main/MyPageReactor.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/MyPage/Main/MyPageReactor.swift index e731d238..49189d2c 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/MyPage/Main/MyPageReactor.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/MyPage/Main/MyPageReactor.swift @@ -168,6 +168,9 @@ final class MyPageReactor: Reactor { UserDefaultService.Key.allCases .filter { $0 != .lastLogin } .forEach { self?.userDefaultService.delete(keyType: $0) } + + @Dependency var keyChainService: KeyChainService + TokenType.allCases.forEach { keyChainService.deleteToken(type: $0) } }) .andThen(Observable.just(.logout)) .catch { _ in Observable.empty() } diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/MyPage/Withdrawl/SelectedReason/WithdrawlReasonReactor.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/MyPage/Withdrawl/SelectedReason/WithdrawlReasonReactor.swift index 27e690b9..a99e8a53 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/MyPage/Withdrawl/SelectedReason/WithdrawlReasonReactor.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/MyPage/Withdrawl/SelectedReason/WithdrawlReasonReactor.swift @@ -110,6 +110,7 @@ final class WithdrawlReasonReactor: Reactor { keyChainService.deleteToken(type: .accessToken) keyChainService.deleteToken(type: .refreshToken) UserDefaultService.Key.allCases.forEach { userDefaultService.delete(keyType: $0) } + TokenType.allCases.forEach { keyChainService.deleteToken(type: $0) } let nextController = WithdrawlCompleteController() nextController.mainView.checkButton.rx.tap From ebf8c41e9c543160b47e2144dde4a05469d18dda Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Wed, 3 Sep 2025 02:36:41 +0900 Subject: [PATCH 08/15] =?UTF-8?q?refactor/#173:=20=ED=82=A4=EC=B2=B4?= =?UTF-8?q?=EC=9D=B8=20=EC=8B=A4=ED=8C=A8=20=EB=A1=9C=EA=B7=B8=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 --- .../Service/KeyChainService.swift | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Poppool/CoreLayer/Infrastructure/Infrastructure/Service/KeyChainService.swift b/Poppool/CoreLayer/Infrastructure/Infrastructure/Service/KeyChainService.swift index 1ce0a244..ec5234c7 100644 --- a/Poppool/CoreLayer/Infrastructure/Infrastructure/Service/KeyChainService.swift +++ b/Poppool/CoreLayer/Infrastructure/Infrastructure/Service/KeyChainService.swift @@ -46,6 +46,10 @@ public final class KeyChainService { ) return .success(value) } else { + Logger.log( + "Failed to fetched \(type.rawValue) from KeyChain", + category: .info + ) return .failure(KeyChainError.dataConversionError(message: "Failed to convert data to String.")) } } else { @@ -81,12 +85,15 @@ public final class KeyChainService { let status = SecItemAdd(keyChainQuery, nil) if status == errSecSuccess { Logger.log( - "Successfully fetched \(type.rawValue) from KeyChain: \(value)", + "Successfully saved \(type.rawValue) from KeyChain", category: .info - ) return .success(()) } else { + Logger.log( + "Faied to save \(type.rawValue) from KeyChain", + category: .info + ) return .failure(KeyChainError.unhandledError(status: status)) } } @@ -113,12 +120,16 @@ public final class KeyChainService { ) return .success(()) } else { + Logger.log( + "Faied to deleted \(type.rawValue) from KeyChain", + category: .info + ) return .failure(KeyChainError.unhandledError(status: status)) } } } -public enum TokenType: String { +public enum TokenType: String, CaseIterable { case accessToken // 액세스 토큰 case refreshToken // 리프레시 토큰 } From e3631840d5818715dccbe5d486592b8f7297ed26 Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Thu, 4 Sep 2025 20:48:13 +0900 Subject: [PATCH 09/15] =?UTF-8?q?fix/#173:=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85=20=ED=9B=84=20=EB=B0=94=EB=A1=9C=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8D=98=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Poppool/DataLayer/Data/Data/Network/Provider/ProviderImpl.swift | 2 +- .../Data/Data/RepositoryImpl/SignUpRepositoryImpl.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Poppool/DataLayer/Data/Data/Network/Provider/ProviderImpl.swift b/Poppool/DataLayer/Data/Data/Network/Provider/ProviderImpl.swift index e46126b9..5b31378f 100644 --- a/Poppool/DataLayer/Data/Data/Network/Provider/ProviderImpl.swift +++ b/Poppool/DataLayer/Data/Data/Network/Provider/ProviderImpl.swift @@ -98,7 +98,7 @@ public final class ProviderImpl: Provider { // 만약 헤더에 새 토큰이 있으면 저장 if var accessToken = response.response?.allHeaderFields["Authorization"] as? String, - var refreshToken = response.response?.allHeaderFields["authorization-refresh"] as? String { + var refreshToken = response.response?.allHeaderFields["Authorization-refresh"] as? String { accessToken = accessToken.replacingOccurrences(of: "Bearer ", with: "") refreshToken = refreshToken.replacingOccurrences(of: "Bearer ", with: "") diff --git a/Poppool/DataLayer/Data/Data/RepositoryImpl/SignUpRepositoryImpl.swift b/Poppool/DataLayer/Data/Data/RepositoryImpl/SignUpRepositoryImpl.swift index 8b769303..eecc359f 100644 --- a/Poppool/DataLayer/Data/Data/RepositoryImpl/SignUpRepositoryImpl.swift +++ b/Poppool/DataLayer/Data/Data/RepositoryImpl/SignUpRepositoryImpl.swift @@ -42,7 +42,7 @@ public final class SignUpRepositoryImpl: SignUpRepository { interestCategories: interests, appleAuthorizationCode: appleAuthorizationCode) ) - print(endPoint) + return provider.request(with: endPoint, interceptor: TokenInterceptor()) } } From 06783cae5a9ae9024294f44a8a8a09e56cc75573 Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Thu, 4 Sep 2025 20:48:55 +0900 Subject: [PATCH 10/15] =?UTF-8?q?chore/#173:=20Xcode26=20=EB=A6=AC?= =?UTF-8?q?=ED=80=B4=EB=93=9C=EA=B8=80=EB=9E=98=EC=84=9C=20=ED=9A=A8?= =?UTF-8?q?=EA=B3=BC=20=EC=9E=90=EB=8F=99=EC=A0=81=EC=9A=A9=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Poppool/Poppool.xcodeproj/project.pbxproj | 2 ++ Poppool/Poppool/Resource/Info.plist | 18 +++++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Poppool/Poppool.xcodeproj/project.pbxproj b/Poppool/Poppool.xcodeproj/project.pbxproj index b854517c..e40d7ece 100644 --- a/Poppool/Poppool.xcodeproj/project.pbxproj +++ b/Poppool/Poppool.xcodeproj/project.pbxproj @@ -444,6 +444,7 @@ ENABLE_USER_SCRIPT_SANDBOXING = NO; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Poppool/Resource/Info.plist; + INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO; INFOPLIST_KEY_NSCameraUsageDescription = "사용자가 프로필 사진을 업로드하거나 댓글에 사진을 추가할 수 있도록 카메라를 사용합니다."; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "사용자의 현재 위치를 기반으로 주변 게시글을 추천하는 데 사용됩니다."; INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "사용자가 프로필 사진을 업로드하거나 댓글에 사진을 추가할 수 있도록 사진라이브러리에 접근합니다."; @@ -491,6 +492,7 @@ ENABLE_USER_SCRIPT_SANDBOXING = NO; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Poppool/Resource/Info.plist; + INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO; INFOPLIST_KEY_NSCameraUsageDescription = "사용자가 프로필 사진을 업로드하거나 댓글에 사진을 추가할 수 있도록 카메라를 사용합니다."; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "사용자의 현재 위치를 기반으로 주변 게시글을 추천하는 데 사용됩니다."; INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "사용자가 프로필 사진을 업로드하거나 댓글에 사진을 추가할 수 있도록 사진라이브러리에 접근합니다."; diff --git a/Poppool/Poppool/Resource/Info.plist b/Poppool/Poppool/Resource/Info.plist index 61793be6..3a4cda04 100644 --- a/Poppool/Poppool/Resource/Info.plist +++ b/Poppool/Poppool/Resource/Info.plist @@ -2,15 +2,6 @@ - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - ITSAppUsesNonExemptEncryption - - CFBundleShortVersionString - $(MARKETING_VERSION) CFBundleURLTypes @@ -22,8 +13,6 @@ - CFBundleVersion - 250725.1554 KAKAO_AUTH_APP_KEY ${KAKAO_AUTH_APP_KEY} LSApplicationQueriesSchemes @@ -38,6 +27,11 @@ NAVER_MAP_CLIENT_ID ${NAVER_MAP_CLIENT_ID} + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + POPPOOL_API_KEY ${POPPOOL_API_KEY} POPPOOL_BASE_URL @@ -61,5 +55,7 @@ + UIDesignRequiresCompatibility + From 768aafa99506a88e63c4fe752b50f68f0de17b29 Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Thu, 4 Sep 2025 21:32:14 +0900 Subject: [PATCH 11/15] =?UTF-8?q?fix/#173:=20=EC=95=A0=ED=94=8C=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EC=A4=91=EB=B3=B5=20=EC=9D=B4=EB=8F=99=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Data/Data/Network/Service/AppleLoginService.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Poppool/DataLayer/Data/Data/Network/Service/AppleLoginService.swift b/Poppool/DataLayer/Data/Data/Network/Service/AppleLoginService.swift index a119d861..2abe4a8a 100644 --- a/Poppool/DataLayer/Data/Data/Network/Service/AppleLoginService.swift +++ b/Poppool/DataLayer/Data/Data/Network/Service/AppleLoginService.swift @@ -9,9 +9,10 @@ public final class AppleLoginService: NSObject, AuthServiceable { public override init() { } // 사용자 자격 증명 정보를 방출할 subject - private var authServiceResponse: PublishSubject = .init() + private var authServiceResponse = PublishSubject() func fetchUserCredential() -> Observable { + self.authServiceResponse = PublishSubject() performRequest() return authServiceResponse } From 962aac4161a388c05111615746ba3c8cb6b46226 Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Thu, 4 Sep 2025 22:19:20 +0900 Subject: [PATCH 12/15] =?UTF-8?q?refactor/#173:=20=EC=95=A0=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=BD=94=EB=93=9C=20=EB=A6=AC?= =?UTF-8?q?=ED=8C=A9=ED=84=B0=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 델리게이트의 생명주기를 메서드가 아닌 상위 클래스가 관리하도록 수정 - 인증 컨트롤러를 한번만 생성하도록 수정 --- .../Network/Service/AppleLoginService.swift | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/Poppool/DataLayer/Data/Data/Network/Service/AppleLoginService.swift b/Poppool/DataLayer/Data/Data/Network/Service/AppleLoginService.swift index 2abe4a8a..b0ceb935 100644 --- a/Poppool/DataLayer/Data/Data/Network/Service/AppleLoginService.swift +++ b/Poppool/DataLayer/Data/Data/Network/Service/AppleLoginService.swift @@ -6,27 +6,32 @@ import RxSwift public final class AppleLoginService: NSObject, AuthServiceable { - public override init() { } + private let authorizationController: ASAuthorizationController - // 사용자 자격 증명 정보를 방출할 subject - private var authServiceResponse = PublishSubject() + public override init() { + self.authorizationController = AppleLoginService.makeAuthController() - func fetchUserCredential() -> Observable { - self.authServiceResponse = PublishSubject() - performRequest() - return authServiceResponse + super.init() + + authorizationController.delegate = self + authorizationController.presentationContextProvider = self } - // Apple 인증 요청을 수행하는 함수 - private func performRequest() { + private static func makeAuthController() -> ASAuthorizationController { let appleIDProvider = ASAuthorizationAppleIDProvider() let request = appleIDProvider.createRequest() request.requestedScopes = [.fullName, .email] + return ASAuthorizationController(authorizationRequests: [request]) + } - let authorizationController = ASAuthorizationController(authorizationRequests: [request]) - authorizationController.delegate = self - authorizationController.presentationContextProvider = self - authorizationController.performRequests() + // 사용자 자격 증명 정보를 방출할 subject + private var authServiceResponse = PublishSubject() + + func fetchUserCredential() -> Observable { + self.authServiceResponse = PublishSubject() + self.authorizationController.performRequests() + + return authServiceResponse } } From 066990525df1019eafde574837f3101f7b4c036b Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Fri, 12 Sep 2025 17:15:34 +0900 Subject: [PATCH 13/15] =?UTF-8?q?refactor/#173:=20ASAuthorizationControlle?= =?UTF-8?q?r=20=EC=9D=B8=EC=8A=A4=ED=84=B4=EC=8A=A4=20=EC=9E=AC=EC=83=9D?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 단일 컨트롤러 재사용시 상태 오류/중복 가능성 있음 --- .../Network/Service/AppleLoginService.swift | 29 ++++++++----------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/Poppool/DataLayer/Data/Data/Network/Service/AppleLoginService.swift b/Poppool/DataLayer/Data/Data/Network/Service/AppleLoginService.swift index b0ceb935..a5a84ba3 100644 --- a/Poppool/DataLayer/Data/Data/Network/Service/AppleLoginService.swift +++ b/Poppool/DataLayer/Data/Data/Network/Service/AppleLoginService.swift @@ -6,30 +6,25 @@ import RxSwift public final class AppleLoginService: NSObject, AuthServiceable { - private let authorizationController: ASAuthorizationController + private var authorizationController: ASAuthorizationController? + private var authServiceResponse = PublishSubject() // 사용자 자격 증명 정보를 방출할 subject - public override init() { - self.authorizationController = AppleLoginService.makeAuthController() - - super.init() - - authorizationController.delegate = self - authorizationController.presentationContextProvider = self - } - - private static func makeAuthController() -> ASAuthorizationController { + private func makeAuthController() -> ASAuthorizationController { let appleIDProvider = ASAuthorizationAppleIDProvider() let request = appleIDProvider.createRequest() request.requestedScopes = [.fullName, .email] - return ASAuthorizationController(authorizationRequests: [request]) - } - // 사용자 자격 증명 정보를 방출할 subject - private var authServiceResponse = PublishSubject() + let controller = ASAuthorizationController(authorizationRequests: [request]) + controller.delegate = self + controller.presentationContextProvider = self + + return controller + } func fetchUserCredential() -> Observable { - self.authServiceResponse = PublishSubject() - self.authorizationController.performRequests() + authServiceResponse = PublishSubject() + authorizationController = makeAuthController() + authorizationController?.performRequests() return authServiceResponse } From fa96273ec65009f2ab3a6775d06dd0651ae38ac7 Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Fri, 12 Sep 2025 17:24:21 +0900 Subject: [PATCH 14/15] =?UTF-8?q?fix/#173:=20PPUnderlined=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Then 사용중이어서 import문 추가 - trailing comma 제거 --- .../DesignSystem/Components/PPUnderlinedTextButton.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPUnderlinedTextButton.swift b/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPUnderlinedTextButton.swift index fb70abb0..c3956133 100644 --- a/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPUnderlinedTextButton.swift +++ b/Poppool/PresentationLayer/DesignSystem/DesignSystem/Components/PPUnderlinedTextButton.swift @@ -1,6 +1,7 @@ import UIKit import SnapKit +import Then public final class PPUnderlinedTextButton: UIButton { @@ -14,7 +15,7 @@ public final class PPUnderlinedTextButton: UIButton { public init( fontStyle: PPFontStyle = .KOm16, text: String, - disabledText: String = "", + disabledText: String = "" ) { super.init(frame: .zero) From 5c48860fcacab8f139a65ed2f00d23cd346407a6 Mon Sep 17 00:00:00 2001 From: 0Hooni Date: Fri, 12 Sep 2025 17:28:58 +0900 Subject: [PATCH 15/15] =?UTF-8?q?fix/#173:=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20=ED=8C=A8=ED=82=A4=EC=A7=80=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - RxRelay 사용중이어서 import문과 패키지 의존성 추가 --- .../Presentation/Presentation.xcodeproj/project.pbxproj | 8 ++++++++ .../Scene/SignUp/Step1/View/SignUpCheckBoxButton.swift | 1 + .../Scene/SignUp/Step1/View/SignUpTermsView.swift | 1 + 3 files changed, 10 insertions(+) diff --git a/Poppool/PresentationLayer/Presentation/Presentation.xcodeproj/project.pbxproj b/Poppool/PresentationLayer/Presentation/Presentation.xcodeproj/project.pbxproj index c92cebc1..430eb61c 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation.xcodeproj/project.pbxproj +++ b/Poppool/PresentationLayer/Presentation/Presentation.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ 05125B982DB626E3001342A2 /* ReactorKit in Frameworks */ = {isa = PBXBuildFile; productRef = 05125B972DB626E3001342A2 /* ReactorKit */; }; 05125BA12DB6275C001342A2 /* PanModal in Frameworks */ = {isa = PBXBuildFile; productRef = 05125BA02DB6275C001342A2 /* PanModal */; }; 051631302DC3D1FD00A6C0D1 /* DesignSystem.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0516312F2DC3D1FD00A6C0D1 /* DesignSystem.framework */; }; + 0520B78D2E7410BF009E4BF3 /* RxRelay in Frameworks */ = {isa = PBXBuildFile; productRef = 0520B78C2E7410BF009E4BF3 /* RxRelay */; }; 0522C1E12DB67C8300B141FF /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 0522C1E02DB67C8300B141FF /* RxSwift */; }; 055C24D72E28FC6200AD389C /* PresentationInterface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05734C352DCDF6EC0093825D /* PresentationInterface.framework */; }; 055C24E32E28FCA000AD389C /* DesignSystem.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0516312F2DC3D1FD00A6C0D1 /* DesignSystem.framework */; }; @@ -109,6 +110,7 @@ 05BDD5CF2DB6770300C1E192 /* Lottie in Frameworks */, 08B2A35B2DB66B5A00E57EFA /* FloatingPanel in Frameworks */, 08B2A3612DB66BAB00E57EFA /* Then in Frameworks */, + 0520B78D2E7410BF009E4BF3 /* RxRelay in Frameworks */, 05734C572DCDF9E80093825D /* NMapsMap in Frameworks */, 0522C1E12DB67C8300B141FF /* RxSwift in Frameworks */, 05C1D62E2DB53A8200508FFD /* Infrastructure.framework in Frameworks */, @@ -264,6 +266,7 @@ 05BDD5CE2DB6770300C1E192 /* Lottie */, 0522C1E02DB67C8300B141FF /* RxSwift */, 05734C562DCDF9E80093825D /* NMapsMap */, + 0520B78C2E7410BF009E4BF3 /* RxRelay */, ); productName = Presentation; productReference = 058CC9042DB537960084221A /* Presentation.framework */; @@ -894,6 +897,11 @@ package = 05125B9F2DB6275C001342A2 /* XCRemoteSwiftPackageReference "PanModal" */; productName = PanModal; }; + 0520B78C2E7410BF009E4BF3 /* RxRelay */ = { + isa = XCSwiftPackageProductDependency; + package = 05125B932DB62295001342A2 /* XCRemoteSwiftPackageReference "RxSwift" */; + productName = RxRelay; + }; 0522C1E02DB67C8300B141FF /* RxSwift */ = { isa = XCSwiftPackageProductDependency; package = 05125B932DB62295001342A2 /* XCRemoteSwiftPackageReference "RxSwift" */; diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpCheckBoxButton.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpCheckBoxButton.swift index b8f17e32..91dddc76 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpCheckBoxButton.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpCheckBoxButton.swift @@ -3,6 +3,7 @@ import UIKit import DesignSystem import RxCocoa +import RxRelay import RxSwift import SnapKit diff --git a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpTermsView.swift b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpTermsView.swift index f4209102..4f1694f2 100644 --- a/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpTermsView.swift +++ b/Poppool/PresentationLayer/Presentation/Presentation/Scene/SignUp/Step1/View/SignUpTermsView.swift @@ -3,6 +3,7 @@ import UIKit import DesignSystem import RxCocoa +import RxRelay import RxSwift import SnapKit