From 7dcb2259875d87393b25f8b4c848044c7508d548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Fri, 7 Jun 2024 19:14:26 +0900 Subject: [PATCH 1/9] =?UTF-8?q?Feat=20[#373]=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EA=B8=B0=EB=B0=98=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Setting/Withdrawal/View/WithdrawalReasonView.swift | 4 ++++ .../WithdrawalReasonViewController.swift | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalReasonView.swift b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalReasonView.swift index ac38d25f..d40239f9 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalReasonView.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalReasonView.swift @@ -26,6 +26,7 @@ final class WithdrawalReasonView: BaseView { self.setCompleteButton(isEnabled: isCompleteEnabled) } } + var isNoFriendSelected = false var etcReason: String = "" var tap = UITapGestureRecognizer() var withdrawalReason: String = "" @@ -172,8 +173,11 @@ extension WithdrawalReasonView: UICollectionViewDataSource { let indexPath = IndexPath(item: self.reasonList.count - 1, section: 0) reasonCollectionView.scrollToItem(at: indexPath, at: .bottom, animated: true) withdrawalReason = etcReason + } else if indexPath.row == 0 { + isNoFriendSelected = true } else { withdrawalReason = reasonList[indexPath.row] + isNoFriendSelected = false } } } diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift index 05b27409..c5eac025 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift @@ -35,7 +35,7 @@ final class WithdrawalReasonViewController: BaseViewController { } private func setAddTarget() { - withdrawalReasonView.completeButton.addTarget(self, action: #selector(showAlert), for: .touchUpInside) + withdrawalReasonView.completeButton.addTarget(self, action: #selector(completeButtonTapped), for: .touchUpInside) } } @@ -52,6 +52,14 @@ extension WithdrawalReasonViewController { $0.edges.equalToSuperview() } } + + @objc func completeButtonTapped() { + if withdrawalReasonView.isNoFriendSelected { + print("앱에 아는 친구가 없단다..") + } else { + showAlert() + } + } } // MARK: HandleBackButtonDelegate From 9cb2d7fea091729fd977c93a0f9a6838a8547d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Fri, 7 Jun 2024 19:33:56 +0900 Subject: [PATCH 2/9] =?UTF-8?q?Add=20[#373]=20asset,=20file=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 --- YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj | 4 +++ .../YELLO-iOS/Global/Literals/Image.swift | 1 + .../YELLO-iOS/Global/Literals/String.swift | 6 +++++ .../Contents.json | 21 +++++++++++++++ .../noFriend.svg | 27 +++++++++++++++++++ .../View/WithdrawalNoFriendView.swift | 20 ++++++++++++++ 6 files changed, 79 insertions(+) create mode 100644 YELLO-iOS/YELLO-iOS/Global/Resources/Assets.xcassets/imgWithdrawalNoFriend.imageset/Contents.json create mode 100644 YELLO-iOS/YELLO-iOS/Global/Resources/Assets.xcassets/imgWithdrawalNoFriend.imageset/noFriend.svg create mode 100644 YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift diff --git a/YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj b/YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj index 9f1a5a6b..bcbd0385 100644 --- a/YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj +++ b/YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj @@ -252,6 +252,7 @@ C31315AD2A7B78EE00FB8B43 /* FriendSearchTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31315AC2A7B78EE00FB8B43 /* FriendSearchTableViewCell.swift */; }; C31315B02A7B806D00FB8B43 /* UIViewController+.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31315AF2A7B806D00FB8B43 /* UIViewController+.swift */; }; C31315B22A7CBA6F00FB8B43 /* MyYelloButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31315B12A7CBA6F00FB8B43 /* MyYelloButton.swift */; }; + C316C99F2C13156600982F21 /* WithdrawalNoFriendView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C316C99E2C13156600982F21 /* WithdrawalNoFriendView.swift */; }; C32322F52A619E92006DA50B /* PaymentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32322F42A619E92006DA50B /* PaymentView.swift */; }; C32322F92A61ABF2006DA50B /* PaymentCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32322F82A61ABF2006DA50B /* PaymentCollectionViewCell.swift */; }; C3291A082A920D84007F2CF5 /* AppStoreCheck.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3291A072A920D84007F2CF5 /* AppStoreCheck.swift */; }; @@ -604,6 +605,7 @@ C31315AC2A7B78EE00FB8B43 /* FriendSearchTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendSearchTableViewCell.swift; sourceTree = ""; }; C31315AF2A7B806D00FB8B43 /* UIViewController+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+.swift"; sourceTree = ""; }; C31315B12A7CBA6F00FB8B43 /* MyYelloButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyYelloButton.swift; sourceTree = ""; }; + C316C99E2C13156600982F21 /* WithdrawalNoFriendView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WithdrawalNoFriendView.swift; sourceTree = ""; }; C32322F42A619E92006DA50B /* PaymentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentView.swift; sourceTree = ""; }; C32322F82A61ABF2006DA50B /* PaymentCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaymentCollectionViewCell.swift; sourceTree = ""; }; C3291A072A920D84007F2CF5 /* AppStoreCheck.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppStoreCheck.swift; sourceTree = ""; }; @@ -2389,6 +2391,7 @@ C3FF24702A5D47DD00A97D40 /* WithdrawalCheckView.swift */, C303C8232B6005980077C423 /* WithdrawalReasonView.swift */, C3FF24742A5D6E9500A97D40 /* WithdrawalAlertView.swift */, + C316C99E2C13156600982F21 /* WithdrawalNoFriendView.swift */, C3C5D8222B628AC500C8D27C /* ReasonHeaderView.swift */, ); path = View; @@ -2833,6 +2836,7 @@ C3D2663D2A5C73360041C7C7 /* MyProfileView.swift in Sources */, C3081E4B2A82B06B0088CA44 /* MyFriendSkeletonTableViewCell.swift in Sources */, 36B2349A2A61A20C007933E4 /* KakaoLoginViewController.swift in Sources */, + C316C99F2C13156600982F21 /* WithdrawalNoFriendView.swift in Sources */, C37DFC462A8501E300D3B685 /* PaymentPlusViewController.swift in Sources */, 36E427722A5BCE860050B34E /* YelloSelectButton.swift in Sources */, 2A3705D42A62E33E001AAC93 /* RecommendingTarget.swift in Sources */, diff --git a/YELLO-iOS/YELLO-iOS/Global/Literals/Image.swift b/YELLO-iOS/YELLO-iOS/Global/Literals/Image.swift index 57986c25..04266c07 100644 --- a/YELLO-iOS/YELLO-iOS/Global/Literals/Image.swift +++ b/YELLO-iOS/YELLO-iOS/Global/Literals/Image.swift @@ -200,6 +200,7 @@ enum ImageLiterals { static var imgWithdrawalThird: UIImage { .load(named: "imgWithdrawalThird")} static var imgWarning: UIImage { .load(named: "imgWarning")} static var imgWithdrawalPoint: UIImage { .load(named: "imgWithdrawalPoint")} + static var imgWithdrawalNoFriend: UIImage { .load(named: "imgWithdrawalNoFriend")} } enum SubscriptionExtension { diff --git a/YELLO-iOS/YELLO-iOS/Global/Literals/String.swift b/YELLO-iOS/YELLO-iOS/Global/Literals/String.swift index 033e984f..df735bc9 100644 --- a/YELLO-iOS/YELLO-iOS/Global/Literals/String.swift +++ b/YELLO-iOS/YELLO-iOS/Global/Literals/String.swift @@ -428,6 +428,12 @@ enum StringLiterals { static let yes = "네, 탈퇴합니다" } + enum WithdrawalNoFriend { + static let title = "친구가 없다면\n친구를 초대할 수도 있어요." + static let nextLabel = "다음에 할게요" + static let wowLabel = "오, 그런 방법이!" + } + enum WithdrawalReason { static let title = "탈퇴 사유를 적어주세요." static let nobody = "앱에 아는 사람들이 없어서" diff --git a/YELLO-iOS/YELLO-iOS/Global/Resources/Assets.xcassets/imgWithdrawalNoFriend.imageset/Contents.json b/YELLO-iOS/YELLO-iOS/Global/Resources/Assets.xcassets/imgWithdrawalNoFriend.imageset/Contents.json new file mode 100644 index 00000000..243d1a45 --- /dev/null +++ b/YELLO-iOS/YELLO-iOS/Global/Resources/Assets.xcassets/imgWithdrawalNoFriend.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "noFriend.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YELLO-iOS/YELLO-iOS/Global/Resources/Assets.xcassets/imgWithdrawalNoFriend.imageset/noFriend.svg b/YELLO-iOS/YELLO-iOS/Global/Resources/Assets.xcassets/imgWithdrawalNoFriend.imageset/noFriend.svg new file mode 100644 index 00000000..22dcb38c --- /dev/null +++ b/YELLO-iOS/YELLO-iOS/Global/Resources/Assets.xcassets/imgWithdrawalNoFriend.imageset/noFriend.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift new file mode 100644 index 00000000..27d3faf2 --- /dev/null +++ b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift @@ -0,0 +1,20 @@ +// +// WithdrawalNoFriendView.swift +// YELLO-iOS +// +// Created by 정채은 on 6/7/24. +// + +import UIKit + +class WithdrawalNoFriendView: UIView { + + /* + // Only override draw() if you perform custom drawing. + // An empty implementation adversely affects performance during animation. + override func draw(_ rect: CGRect) { + // Drawing code + } + */ + +} From b8e1aecd5ab0ad11a858b05e5c0489de1870afca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Fri, 7 Jun 2024 19:36:41 +0900 Subject: [PATCH 3/9] =?UTF-8?q?Feat=20[#373]=20UI=20=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=95=84=EC=9B=83=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/WithdrawalNoFriendView.swift | 109 ++++++++++++++++-- .../WithdrawalReasonViewController.swift | 6 +- 2 files changed, 107 insertions(+), 8 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift index 27d3faf2..7e1b0983 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift @@ -7,14 +7,109 @@ import UIKit -class WithdrawalNoFriendView: UIView { +import SnapKit +import Then - /* - // Only override draw() if you perform custom drawing. - // An empty implementation adversely affects performance during animation. - override func draw(_ rect: CGRect) { - // Drawing code +final class WithdrawalNoFriendView: BaseView { + // MARK: - Variables + // MARK: Property + let contentsView = UIView() + + private let titleLabel = UILabel() + private let noFriendImageView = UIImageView() + let nextButton = UIButton() + let wowButton = UIButton() + + override func setStyle() { + // MARK: - Function + // MARK: Layout Helpers + self.backgroundColor = .black.withAlphaComponent(0.5) + + let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(nextButtonTapped)) + self.addGestureRecognizer(tapGestureRecognizer) + + contentsView.do { + $0.makeCornerRound(radius: 12.adjustedHeight) + $0.backgroundColor = .grayscales900 + } + + titleLabel.do { + $0.setTextWithLineHeight(text: StringLiterals.Profile.WithdrawalNoFriend.title, lineHeight: 24.adjustedHeight) + $0.font = .uiSubtitle01 + $0.textAlignment = .center + $0.textColor = .white + } + + noFriendImageView.do { + $0.image = ImageLiterals.Withdrawal.imgWithdrawalNoFriend + } + + nextButton.do { + $0.setTitle(StringLiterals.Profile.WithdrawalNoFriend.nextLabel, for: .normal) + $0.setTitleColor(.grayscales600, for: .normal) + $0.titleLabel?.font = .uiButton + $0.addTarget(self, action: #selector(nextButtonTapped), for: .touchUpInside) + } + + wowButton.do { + $0.setTitle(StringLiterals.Profile.WithdrawalNoFriend.wowLabel, for: .normal) + $0.setTitleColor(.yelloMain500, for: .normal) + $0.titleLabel?.font = .uiButton + $0.addTarget(self, action: #selector(wowButtonTapped), for: .touchUpInside) + } } - */ + + override func setLayout() { + self.addSubview(contentsView) + + contentsView.addSubviews(titleLabel, + noFriendImageView, + nextButton, + wowButton) + + contentsView.snp.makeConstraints { + $0.center.equalToSuperview() + $0.width.equalTo(280.adjustedWidth) + $0.height.equalTo(317.adjustedHeight) + } + + titleLabel.snp.makeConstraints { + $0.top.equalToSuperview().offset(44.adjustedHeight) + $0.centerX.equalToSuperview() + } + + noFriendImageView.snp.makeConstraints { + $0.top.equalTo(titleLabel.snp.bottom).offset(16.adjustedHeight) + $0.centerX.equalToSuperview() + $0.size.equalTo(100.adjusted) + } + + nextButton.snp.makeConstraints { + $0.top.equalTo(noFriendImageView.snp.bottom).offset(49.adjustedHeight) + $0.leading.equalToSuperview().inset(38.adjustedWidth) + $0.width.equalTo(80.adjustedWidth) + $0.height.equalTo(40.adjustedHeight) + $0.bottom.equalToSuperview().inset(20) + } + + wowButton.snp.makeConstraints { + $0.top.bottom.equalTo(nextButton) + $0.trailing.equalToSuperview().inset(38.adjustedWidth) + $0.width.equalTo(81.adjustedWidth) + $0.height.equalTo(40.adjustedHeight) + } + } +} +extension WithdrawalNoFriendView { + @objc private func nextButtonTapped() { + self.isHidden = true + self.removeFromSuperview() + } + + @objc private func wowButtonTapped() { + self.isHidden = true + self.removeFromSuperview() + print("노티피케이션 추가") + } } diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift index c5eac025..68d3baaf 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift @@ -55,7 +55,11 @@ extension WithdrawalReasonViewController { @objc func completeButtonTapped() { if withdrawalReasonView.isNoFriendSelected { - print("앱에 아는 친구가 없단다..") + let withdrawalNoFriendView = WithdrawalNoFriendView() + self.view.addSubview(withdrawalNoFriendView) + withdrawalNoFriendView.snp.makeConstraints { + $0.edges.equalToSuperview() + } } else { showAlert() } From a4e1affcaa088bb402f90642f9382004552c2c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Fri, 7 Jun 2024 20:19:53 +0900 Subject: [PATCH 4/9] =?UTF-8?q?Feat=20[#373]=20nextButton=20closure=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 --- YELLO-iOS/YELLO-iOS/Global/Literals/String.swift | 2 +- .../Withdrawal/View/WithdrawalNoFriendView.swift | 15 ++++++++++----- .../WithdrawalReasonViewController.swift | 3 +++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Global/Literals/String.swift b/YELLO-iOS/YELLO-iOS/Global/Literals/String.swift index df735bc9..0f314b7f 100644 --- a/YELLO-iOS/YELLO-iOS/Global/Literals/String.swift +++ b/YELLO-iOS/YELLO-iOS/Global/Literals/String.swift @@ -436,7 +436,7 @@ enum StringLiterals { enum WithdrawalReason { static let title = "탈퇴 사유를 적어주세요." - static let nobody = "앱에 아는 사람들이 없어서" + static let nobody = "앱에 아는 친구들이 없어서" static let expensive = "구독권과 열람권의 가격이 비싸서" static let error = "오류가 많아서" static let notFunny = "재밌는 콘텐츠 또는 질문이 없어서" diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift index 7e1b0983..e3fb5513 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift @@ -14,18 +14,19 @@ final class WithdrawalNoFriendView: BaseView { // MARK: - Variables // MARK: Property let contentsView = UIView() - private let titleLabel = UILabel() private let noFriendImageView = UIImageView() let nextButton = UIButton() let wowButton = UIButton() + var nextButtonAction: (() -> Void) = {} + override func setStyle() { // MARK: - Function // MARK: Layout Helpers self.backgroundColor = .black.withAlphaComponent(0.5) - let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(nextButtonTapped)) + let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(closeView)) self.addGestureRecognizer(tapGestureRecognizer) contentsView.do { @@ -102,14 +103,18 @@ final class WithdrawalNoFriendView: BaseView { } extension WithdrawalNoFriendView { - @objc private func nextButtonTapped() { + @objc private func closeView() { self.isHidden = true self.removeFromSuperview() } + @objc private func nextButtonTapped() { + closeView() + nextButtonAction() + } + @objc private func wowButtonTapped() { - self.isHidden = true - self.removeFromSuperview() + closeView() print("노티피케이션 추가") } } diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift index 68d3baaf..2c54c897 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift @@ -60,6 +60,9 @@ extension WithdrawalReasonViewController { withdrawalNoFriendView.snp.makeConstraints { $0.edges.equalToSuperview() } + withdrawalNoFriendView.nextButtonAction = { + self.showAlert() + } } else { showAlert() } From be737501cdb34db985373cfcbbede439fc257c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Fri, 7 Jun 2024 20:21:16 +0900 Subject: [PATCH 5/9] =?UTF-8?q?Fix=20[#373]=20=ED=83=88=ED=87=B4=20?= =?UTF-8?q?=EC=82=AC=EC=9C=A0=20text=20=EB=84=98=EA=B8=B0=EB=8A=94=20?= =?UTF-8?q?=EB=B0=A9=EC=8B=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Setting/Withdrawal/View/WithdrawalReasonView.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalReasonView.swift b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalReasonView.swift index d40239f9..a621caf5 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalReasonView.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalReasonView.swift @@ -173,11 +173,9 @@ extension WithdrawalReasonView: UICollectionViewDataSource { let indexPath = IndexPath(item: self.reasonList.count - 1, section: 0) reasonCollectionView.scrollToItem(at: indexPath, at: .bottom, animated: true) withdrawalReason = etcReason - } else if indexPath.row == 0 { - isNoFriendSelected = true } else { withdrawalReason = reasonList[indexPath.row] - isNoFriendSelected = false + isNoFriendSelected = indexPath.row == 0 ? true : false } } } From 15a9b16676b18bf79398819657844c73bc0c2f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Fri, 7 Jun 2024 23:31:40 +0900 Subject: [PATCH 6/9] =?UTF-8?q?Feat=20[#373]=20=EC=B6=94=EC=B2=9C=EC=B9=9C?= =?UTF-8?q?=EA=B5=AC=EB=A1=9C=20=EB=93=A4=EC=96=B4=EC=98=A4=EB=8A=94=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Setting/Withdrawal/View/WithdrawalNoFriendView.swift | 3 ++- .../ViewController/WithdrawalReasonViewController.swift | 3 +++ .../Presentation/Recommending/View/KakaoFriendView.swift | 2 +- .../Presentation/TabBar/YELLOTabBarController.swift | 7 +++++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift index e3fb5513..d430131a 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/View/WithdrawalNoFriendView.swift @@ -20,6 +20,7 @@ final class WithdrawalNoFriendView: BaseView { let wowButton = UIButton() var nextButtonAction: (() -> Void) = {} + var wowButtonAction: (() -> Void) = {} override func setStyle() { // MARK: - Function @@ -115,6 +116,6 @@ extension WithdrawalNoFriendView { @objc private func wowButtonTapped() { closeView() - print("노티피케이션 추가") + wowButtonAction() } } diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift index 2c54c897..f84cfc25 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift @@ -63,6 +63,9 @@ extension WithdrawalReasonViewController { withdrawalNoFriendView.nextButtonAction = { self.showAlert() } + withdrawalNoFriendView.wowButtonAction = { + NotificationCenter.default.post(name: Notification.Name("moveToRecommend"), object: nil) + } } else { showAlert() } diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Recommending/View/KakaoFriendView.swift b/YELLO-iOS/YELLO-iOS/Presentation/Recommending/View/KakaoFriendView.swift index 4a65fada..82c87917 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Recommending/View/KakaoFriendView.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Recommending/View/KakaoFriendView.swift @@ -31,7 +31,7 @@ final class KakaoFriendView: UIView { var recommendingKakaoFriendTableViewDummy: [FriendModel] = [] // MARK: Component - private let inviteBannerView = InviteBannerView() + let inviteBannerView = InviteBannerView() lazy var kakaoFriendTableView = UITableView() let refreshControl = UIRefreshControl() let emptyView = EmptyFriendView() diff --git a/YELLO-iOS/YELLO-iOS/Presentation/TabBar/YELLOTabBarController.swift b/YELLO-iOS/YELLO-iOS/Presentation/TabBar/YELLOTabBarController.swift index c78a54da..f50e8c12 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/TabBar/YELLOTabBarController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/TabBar/YELLOTabBarController.swift @@ -51,6 +51,7 @@ final class YELLOTabBarController: UITabBarController { NotificationCenter.default.addObserver(self, selector: #selector(showMessage(_:)), name: NSNotification.Name("showMessage"), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(showPage(_:)), name: NSNotification.Name("showPage"), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(goToShop(_:)), name: NSNotification.Name("goToShop"), object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(moveToRecommend(_:)), name: NSNotification.Name("moveToRecommend"), object: nil) } override func viewWillAppear(_ animated: Bool) { @@ -384,6 +385,12 @@ extension YELLOTabBarController { self.navigationController?.pushViewController(paymentPlusViewController, animated: true) } + @objc + func moveToRecommend(_ notification: Notification) { + self.selectedIndex = 0 + self.recommendingViewController.kakaoFriendViewController.kakaoFriendView.inviteBannerView.showAlert() + } + @objc func imageViewTapped() { let notiView: SFSafariViewController From 37c2c50d056083f48016742ac586f375ee8916db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Fri, 7 Jun 2024 23:32:10 +0900 Subject: [PATCH 7/9] =?UTF-8?q?Feat=20[#373]=20tabbar=20index=204=20pop=20?= =?UTF-8?q?=EC=95=88=EB=90=98=EB=8A=94=20=EC=9D=B4=EC=8A=88=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../YELLO-iOS/Presentation/TabBar/YELLOTabBarController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/TabBar/YELLOTabBarController.swift b/YELLO-iOS/YELLO-iOS/Presentation/TabBar/YELLOTabBarController.swift index f50e8c12..2fac8cf6 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/TabBar/YELLOTabBarController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/TabBar/YELLOTabBarController.swift @@ -387,6 +387,9 @@ extension YELLOTabBarController { @objc func moveToRecommend(_ notification: Notification) { + if let navigationController = self.viewControllers?[4] as? UINavigationController { + navigationController.popToRootViewController(animated: false) + } self.selectedIndex = 0 self.recommendingViewController.kakaoFriendViewController.kakaoFriendView.inviteBannerView.showAlert() } From 5a00ea7a436b34487a76ded410982be6682ea762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Sat, 8 Jun 2024 02:13:20 +0900 Subject: [PATCH 8/9] =?UTF-8?q?Feat=20[#373]=20amplitude=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EB=B0=8F=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewController/WithdrawalReasonViewController.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift index f84cfc25..0b313adf 100644 --- a/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift +++ b/YELLO-iOS/YELLO-iOS/Presentation/Profile/Setting/Withdrawal/ViewController/WithdrawalReasonViewController.swift @@ -42,8 +42,6 @@ final class WithdrawalReasonViewController: BaseViewController { extension WithdrawalReasonViewController { // MARK: Objc Function @objc func showAlert() { - Amplitude.instance().logEvent("click_profile_withdrawal", withEventProperties: ["withdrawal_button":"withdrawal3"]) - let withdrawalAlertView = WithdrawalAlertView() withdrawalAlertView.withdrawalReason = withdrawalReasonView.withdrawalReason print(withdrawalAlertView.withdrawalReason) @@ -54,6 +52,8 @@ extension WithdrawalReasonViewController { } @objc func completeButtonTapped() { + Amplitude.instance().logEvent("click_profile_withdrawal", + withEventProperties: ["withdrawal_button":"withdrawal3"]) if withdrawalReasonView.isNoFriendSelected { let withdrawalNoFriendView = WithdrawalNoFriendView() self.view.addSubview(withdrawalNoFriendView) @@ -64,6 +64,7 @@ extension WithdrawalReasonViewController { self.showAlert() } withdrawalNoFriendView.wowButtonAction = { + Amplitude.instance().logEvent("click_withdrawal_recommend") NotificationCenter.default.post(name: Notification.Name("moveToRecommend"), object: nil) } } else { From e81d6b7a8f2020f486e8ead323ca59ae495ed8d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A0=95=EC=B1=84=EC=9D=80?= Date: Mon, 10 Jun 2024 19:52:30 +0900 Subject: [PATCH 9/9] [Chore] Version Update --- YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj b/YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj index bcbd0385..3618be24 100644 --- a/YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj +++ b/YELLO-iOS/YELLO-iOS.xcodeproj/project.pbxproj @@ -3028,7 +3028,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.0; + MARKETING_VERSION = 2.2.1; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = YELLO.iOS.dev; PRODUCT_NAME = "$(Yello_Bundle_Name)"; @@ -3192,7 +3192,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.0; + MARKETING_VERSION = 2.2.1; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = YELLO.iOS; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -3234,7 +3234,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.2.0; + MARKETING_VERSION = 2.2.1; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = YELLO.iOS; PRODUCT_NAME = "$(TARGET_NAME)";