From c185d371ab6697caa44e7e5003394f3988fc3283 Mon Sep 17 00:00:00 2001 From: EunsuSeo01 Date: Wed, 25 Dec 2024 23:56:18 +0900 Subject: [PATCH 1/8] =?UTF-8?q?[Chore]=20#317=20-=20RemoveHankki=20StringL?= =?UTF-8?q?iterals=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Hankkijogbo/Global/Consts/StringLiterals.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Hankkijogbo/Hankkijogbo/Global/Consts/StringLiterals.swift b/Hankkijogbo/Hankkijogbo/Global/Consts/StringLiterals.swift index ccbf025b..cc7c70a3 100644 --- a/Hankkijogbo/Hankkijogbo/Global/Consts/StringLiterals.swift +++ b/Hankkijogbo/Hankkijogbo/Global/Consts/StringLiterals.swift @@ -156,6 +156,15 @@ enum StringLiterals { static let precautionCanStop = "악성 무단 삭제 및 수정 시 서비스 이용이 중단될 수 있습니다" } + enum RemoveHankki { + static let titleWhyRemove = "식당 정보가\n실제와 어떻게 다른가요?" + static let optionDisappeared = "식당이 사라졌어요" + static let optionNoMore8000 = "더이상 8,000원 이하인 메뉴가 없어요" + static let optionImproperHankki = "부적절한 제보예요" + static let modifyCarefullyPlease = ModifyMenu.modifyCarefullyPlease + static let reportButton = Common.report + } + enum EditHankki { static let howToEdit = "어떻게 편집할까요?" static let addNewMenu = "새로운 메뉴\n추가하기" From ceba992c723337bdf21282e77d9bff0c62e7e1fa Mon Sep 17 00:00:00 2001 From: EunsuSeo01 Date: Wed, 25 Dec 2024 23:58:00 +0900 Subject: [PATCH 2/8] =?UTF-8?q?[Design]=20#317=20-=20=EB=8B=A4=EB=A5=B8=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EC=A0=9C=EB=B3=B4=20=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84=20=EB=B0=8F=20RemoveHankki=EB=A1=9C=20?= =?UTF-8?q?=ED=8F=B4=EB=8D=94=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Hankkijogbo.xcodeproj/project.pbxproj | 60 +++--- .../HankkiButtons/BottomButtonView.swift | 1 + .../HankkiMenuCollectionViewCell.swift | 0 .../HankkiMenuFooterView.swift | 0 .../HankkiMenuHeaderView.swift | 0 .../HankkiReportOptionFooterView.swift | 29 --- .../HankkiReportOptionHeaderView.swift | 37 ---- .../View/HankkiDetailViewController.swift | 41 ---- .../View/RemoveHankkiViewController.swift | 54 ------ .../ViewModel/HankkiDetailViewModel.swift | 14 +- .../RemoveOptionCollectionViewCell.swift} | 51 +++-- .../View/RemoveHankkiViewController.swift | 183 ++++++++++++++++++ .../View/RemoveOptionCollectionView.swift} | 14 +- 13 files changed, 254 insertions(+), 230 deletions(-) rename Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/{HankkiDetail => }/HankkiMenuCollectionViewCell.swift (100%) rename Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/{HankkiDetail => }/HankkiMenuFooterView.swift (100%) rename Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/{HankkiDetail => }/HankkiMenuHeaderView.swift (100%) delete mode 100644 Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionFooterView.swift delete mode 100644 Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionHeaderView.swift delete mode 100644 Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/RemoveHankkiViewController.swift rename Hankkijogbo/Hankkijogbo/Present/{HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionCollectionViewCell.swift => RemoveHankki/View/Cell/RemoveOptionCollectionViewCell.swift} (66%) create mode 100644 Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift rename Hankkijogbo/Hankkijogbo/Present/{HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionCollectionView.swift => RemoveHankki/View/RemoveOptionCollectionView.swift} (68%) diff --git a/Hankkijogbo/Hankkijogbo.xcodeproj/project.pbxproj b/Hankkijogbo/Hankkijogbo.xcodeproj/project.pbxproj index 338e09bb..0f711693 100644 --- a/Hankkijogbo/Hankkijogbo.xcodeproj/project.pbxproj +++ b/Hankkijogbo/Hankkijogbo.xcodeproj/project.pbxproj @@ -169,10 +169,8 @@ A240EA442C446AB6000FF458 /* HankkiDetailButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = A240EA432C446AB6000FF458 /* HankkiDetailButton.swift */; }; A240EA462C451061000FF458 /* HankkiMenuCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A240EA452C451061000FF458 /* HankkiMenuCollectionViewCell.swift */; }; A240EA492C45274B000FF458 /* HankkiPaddingLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A240EA482C45274B000FF458 /* HankkiPaddingLabel.swift */; }; - A240EA4E2C454B78000FF458 /* HankkiReportOptionCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A240EA4D2C454B78000FF458 /* HankkiReportOptionCollectionView.swift */; }; - A240EA502C454B90000FF458 /* HankkiReportOptionCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A240EA4F2C454B90000FF458 /* HankkiReportOptionCollectionViewCell.swift */; }; - A240EA522C45519B000FF458 /* HankkiReportOptionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A240EA512C45519B000FF458 /* HankkiReportOptionHeaderView.swift */; }; - A240EA542C4551A3000FF458 /* HankkiReportOptionFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A240EA532C4551A3000FF458 /* HankkiReportOptionFooterView.swift */; }; + A240EA4E2C454B78000FF458 /* RemoveOptionCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A240EA4D2C454B78000FF458 /* RemoveOptionCollectionView.swift */; }; + A240EA502C454B90000FF458 /* RemoveOptionCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A240EA4F2C454B90000FF458 /* RemoveOptionCollectionViewCell.swift */; }; A240EA5B2C459DEA000FF458 /* CATransition+.swift in Sources */ = {isa = PBXBuildFile; fileRef = A240EA5A2C459DEA000FF458 /* CATransition+.swift */; }; A2471B8D2C46AB770080FA30 /* UIApplication+.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2471B8C2C46AB770080FA30 /* UIApplication+.swift */; }; A24A78722CB3F45E0049B031 /* AddMenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A24A78712CB3F45D0049B031 /* AddMenuViewController.swift */; }; @@ -402,10 +400,8 @@ A240EA432C446AB6000FF458 /* HankkiDetailButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HankkiDetailButton.swift; sourceTree = ""; }; A240EA452C451061000FF458 /* HankkiMenuCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HankkiMenuCollectionViewCell.swift; sourceTree = ""; }; A240EA482C45274B000FF458 /* HankkiPaddingLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HankkiPaddingLabel.swift; sourceTree = ""; }; - A240EA4D2C454B78000FF458 /* HankkiReportOptionCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HankkiReportOptionCollectionView.swift; sourceTree = ""; }; - A240EA4F2C454B90000FF458 /* HankkiReportOptionCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HankkiReportOptionCollectionViewCell.swift; sourceTree = ""; }; - A240EA512C45519B000FF458 /* HankkiReportOptionHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HankkiReportOptionHeaderView.swift; sourceTree = ""; }; - A240EA532C4551A3000FF458 /* HankkiReportOptionFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HankkiReportOptionFooterView.swift; sourceTree = ""; }; + A240EA4D2C454B78000FF458 /* RemoveOptionCollectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoveOptionCollectionView.swift; sourceTree = ""; }; + A240EA4F2C454B90000FF458 /* RemoveOptionCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoveOptionCollectionViewCell.swift; sourceTree = ""; }; A240EA5A2C459DEA000FF458 /* CATransition+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CATransition+.swift"; sourceTree = ""; }; A2471B8C2C46AB770080FA30 /* UIApplication+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+.swift"; sourceTree = ""; }; A24A78712CB3F45D0049B031 /* AddMenuViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddMenuViewController.swift; sourceTree = ""; }; @@ -678,6 +674,7 @@ 86685C4D2C3BC63500C080C4 /* UnivSelect */, 83DBED8D2C2564790042BA48 /* Home */, A240EA362C444D2D000FF458 /* HankkiDetail */, + A200C6792D1C3B060065C749 /* RemoveHankki */, A236B5FD2CAC154A00935819 /* HankkiMenu */, A2DEBF572C3D257100DE14A9 /* Report */, 864151692C67B9AD00E2FD44 /* MyZipList */, @@ -1291,6 +1288,24 @@ path = EmptyView; sourceTree = ""; }; + A200C6792D1C3B060065C749 /* RemoveHankki */ = { + isa = PBXGroup; + children = ( + A200C67B2D1C3BB00065C749 /* View */, + ); + path = RemoveHankki; + sourceTree = ""; + }; + A200C67B2D1C3BB00065C749 /* View */ = { + isa = PBXGroup; + children = ( + A200C6722D1B16C40065C749 /* RemoveHankkiViewController.swift */, + A240EA4D2C454B78000FF458 /* RemoveOptionCollectionView.swift */, + A240EA572C4559D7000FF458 /* Cell */, + ); + path = View; + sourceTree = ""; + }; A2079B952C67344100817651 /* Utils */ = { isa = PBXGroup; children = ( @@ -1402,13 +1417,12 @@ A240EA392C4450C7000FF458 /* View */ = { isa = PBXGroup; children = ( + A240EA552C45596C000FF458 /* Cell */, A240EA3B2C4450E2000FF458 /* HankkiDetailViewController.swift */, - A200C6722D1B16C40065C749 /* RemoveHankkiViewController.swift */, A200C66A2D1441AB0065C749 /* DifferentInfoView.swift */, A200C66C2D1872510065C749 /* HankkiInfoView.swift */, A200C66E2D19EA0D0065C749 /* DetailMapView.swift */, A240EA3D2C445D62000FF458 /* HankkiMenuCollectionView.swift */, - A240EA552C45596C000FF458 /* Cell */, A200C6762D1C18960065C749 /* PrecautionView.swift */, ); path = View; @@ -1423,33 +1437,21 @@ sourceTree = ""; }; A240EA552C45596C000FF458 /* Cell */ = { - isa = PBXGroup; - children = ( - A240EA562C455977000FF458 /* HankkiDetail */, - A240EA572C4559D7000FF458 /* HankkiReportOption */, - ); - path = Cell; - sourceTree = ""; - }; - A240EA562C455977000FF458 /* HankkiDetail */ = { isa = PBXGroup; children = ( A240EA3F2C445D6B000FF458 /* HankkiMenuHeaderView.swift */, A240EA452C451061000FF458 /* HankkiMenuCollectionViewCell.swift */, A240EA412C445D86000FF458 /* HankkiMenuFooterView.swift */, ); - path = HankkiDetail; + path = Cell; sourceTree = ""; }; - A240EA572C4559D7000FF458 /* HankkiReportOption */ = { + A240EA572C4559D7000FF458 /* Cell */ = { isa = PBXGroup; children = ( - A240EA4D2C454B78000FF458 /* HankkiReportOptionCollectionView.swift */, - A240EA512C45519B000FF458 /* HankkiReportOptionHeaderView.swift */, - A240EA4F2C454B90000FF458 /* HankkiReportOptionCollectionViewCell.swift */, - A240EA532C4551A3000FF458 /* HankkiReportOptionFooterView.swift */, + A240EA4F2C454B90000FF458 /* RemoveOptionCollectionViewCell.swift */, ); - path = HankkiReportOption; + path = Cell; sourceTree = ""; }; A24A78732CB4499C0049B031 /* View */ = { @@ -1909,7 +1911,6 @@ A240EA3C2C4450E2000FF458 /* HankkiDetailViewController.swift in Sources */, A2C9FCB32C49AFF800868DF7 /* PostHankkiRequestDTO.swift in Sources */, A240EA402C445D6B000FF458 /* HankkiMenuHeaderView.swift in Sources */, - A240EA542C4551A3000FF458 /* HankkiReportOptionFooterView.swift in Sources */, A2471B8D2C46AB770080FA30 /* UIApplication+.swift in Sources */, A2EC33C82C47184500809840 /* GetSearchedLocationResponseDTO.swift in Sources */, 864A89BC2C3B350900140B63 /* AlertStyle.swift in Sources */, @@ -1941,11 +1942,10 @@ 864FA90A2C3D20910051EA36 /* MypageOptionCollectionViewCell.swift in Sources */, A24A78722CB3F45E0049B031 /* AddMenuViewController.swift in Sources */, 8670A7972C49EFC80098DCF1 /* OnboardingModel.swift in Sources */, - A240EA522C45519B000FF458 /* HankkiReportOptionHeaderView.swift in Sources */, 8670A78A2C49C3670098DCF1 /* OnboardingViewController.swift in Sources */, 86880C272C47CCE900CAEF58 /* MypageViewModel.swift in Sources */, 86B761212C3DF60800413059 /* ZipHeaderTableView.swift in Sources */, - A240EA502C454B90000FF458 /* HankkiReportOptionCollectionViewCell.swift in Sources */, + A240EA502C454B90000FF458 /* RemoveOptionCollectionViewCell.swift in Sources */, A2C9FCB52C49B15700868DF7 /* PostHankkiResponseDTO.swift in Sources */, A2C9FCA52C49721200868DF7 /* HankkiDetailViewModel.swift in Sources */, A200C6732D1B16C40065C749 /* RemoveHankkiViewController.swift in Sources */, @@ -2027,7 +2027,7 @@ 865C3D042C4506C8009D9BEA /* ZipFooterTableView.swift in Sources */, 83E9B3422D0C0553009F033E /* FilteringBottomSheetViewController.swift in Sources */, 86B7611F2C3DE05800413059 /* HankkiListTableViewCell.swift in Sources */, - A240EA4E2C454B78000FF458 /* HankkiReportOptionCollectionView.swift in Sources */, + A240EA4E2C454B78000FF458 /* RemoveOptionCollectionView.swift in Sources */, 86880C2D2C480AED00CAEF58 /* ZipListViewModel.swift in Sources */, A2FF94132C31660E001ADA03 /* BaseCollectionViewCell.swift in Sources */, 86BD76092D0309CE0070EC5D /* CreateZipTextField.swift in Sources */, diff --git a/Hankkijogbo/Hankkijogbo/Global/Components/HankkiButtons/BottomButtonView.swift b/Hankkijogbo/Hankkijogbo/Global/Components/HankkiButtons/BottomButtonView.swift index fbe71234..0fc9859f 100644 --- a/Hankkijogbo/Hankkijogbo/Global/Components/HankkiButtons/BottomButtonView.swift +++ b/Hankkijogbo/Hankkijogbo/Global/Components/HankkiButtons/BottomButtonView.swift @@ -189,6 +189,7 @@ final class BottomButtonView: BaseView { } private extension BottomButtonView { + func setupBottomButtonViewGradient() { let gradient = CAGradientLayer() diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiDetail/HankkiMenuCollectionViewCell.swift b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiMenuCollectionViewCell.swift similarity index 100% rename from Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiDetail/HankkiMenuCollectionViewCell.swift rename to Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiMenuCollectionViewCell.swift diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiDetail/HankkiMenuFooterView.swift b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiMenuFooterView.swift similarity index 100% rename from Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiDetail/HankkiMenuFooterView.swift rename to Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiMenuFooterView.swift diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiDetail/HankkiMenuHeaderView.swift b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiMenuHeaderView.swift similarity index 100% rename from Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiDetail/HankkiMenuHeaderView.swift rename to Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiMenuHeaderView.swift diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionFooterView.swift b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionFooterView.swift deleted file mode 100644 index fcc7decc..00000000 --- a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionFooterView.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// HankkiReportOptionFooterView.swift -// Hankkijogbo -// -// Created by 서은수 on 7/15/24. -// - -import UIKit - -final class HankkiReportOptionFooterView: BaseCollectionReusableView { - - // MARK: - UI Components - - let hankkiReportButton: MainButton = MainButton(titleText: StringLiterals.Common.report, isValid: false) - - // MARK: - Setup UI - - override func setupHierarchy() { - addSubview(hankkiReportButton) - } - - override func setupLayout() { - hankkiReportButton.snp.makeConstraints { - $0.centerX.equalToSuperview() - $0.width.equalTo(155) - $0.height.equalTo(54) - } - } -} diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionHeaderView.swift b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionHeaderView.swift deleted file mode 100644 index abd926fb..00000000 --- a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionHeaderView.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// HankkiReportOptionHeaderView.swift -// Hankkijogbo -// -// Created by 서은수 on 7/15/24. -// - -import UIKit - -final class HankkiReportOptionHeaderView: BaseCollectionReusableView { - - // MARK: - UI Components - - private let headerLabel: UILabel = UILabel() - - // MARK: - Setup UI - - override func setupHierarchy() { - addSubview(headerLabel) - } - - override func setupLayout() { - headerLabel.snp.makeConstraints { - $0.top.leading.equalToSuperview() - } - } - - override func setupStyle() { - headerLabel.do { - $0.attributedText = UILabel.setupAttributedText( - for: PretendardStyle.subtitle1, - withText: StringLiterals.HankkiDetail.reportDifferentInformation, - color: .gray900 - ) - } - } -} diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiDetailViewController.swift b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiDetailViewController.swift index 553da7b8..0a203ffe 100644 --- a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiDetailViewController.swift +++ b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/HankkiDetailViewController.swift @@ -260,43 +260,6 @@ private extension HankkiDetailViewController { $0.image = .imgBlackGradient } } - - /// 정말 제보하시겠어요? Alert 띄우기 - func showCheckAlertForReport() { - self.showAlert( - titleText: StringLiterals.Alert.reallyReport, - subText: StringLiterals.Alert.disappearInfoByReport, - secondaryButtonText: StringLiterals.Alert.back, - primaryButtonText: StringLiterals.Common.report, - primaryButtonHandler: deleteHankkiByReport - ) - } - - /// 제보를 통한 식당 삭제 - func deleteHankkiByReport() { - viewModel.deleteHankkiAPI { [self] in - showThanksAlert() - } - } - - /// 제보 감사 Alert 띄우기 - func showThanksAlert() { - let nickname: String = UserDefaults.standard.getNickname() - - self.showAlert( - image: .imgModalReport, - titleText: nickname + StringLiterals.Alert.thanksForReport, - primaryButtonText: StringLiterals.Alert.back, - primaryButtonHandler: dismissAlertAndPop, - hightlightedText: nickname, - hightlightedColor: .red500 - ) - } - - /// Alert를 fade out으로 dismiss 시킴과 동시에 VC를 pop - func dismissAlertAndPop() { - backButtonDidTap() - } } extension HankkiDetailViewController { @@ -339,10 +302,6 @@ extension HankkiDetailViewController { self.navigationController?.pushViewController(removeHankkiViewController, animated: true) } - @objc func hankkiReportButtonDidTap() { - showCheckAlertForReport() - } - @objc func setupBlackToast(_ notification: Notification) { if let zipId = notification.userInfo?["zipId"] as? Int { diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/RemoveHankkiViewController.swift b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/RemoveHankkiViewController.swift deleted file mode 100644 index 000e5699..00000000 --- a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/RemoveHankkiViewController.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// RemoveHankkiViewController.swift -// Hankkijogbo -// -// Created by 서은수 on 12/25/24. -// - -import UIKit - -// MARK: - 식당 정보가 실제와 다른가요? - -final class RemoveHankkiViewController: BaseViewController { - - // MARK: - Properties - - var viewModel: HankkiDetailViewModel - - // MARK: - UI Components - - // MARK: - Life Cycle - - init(viewModel: HankkiDetailViewModel) { - self.viewModel = viewModel - super.init() - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - override func viewDidLoad() { - super.viewDidLoad() - } - - // MARK: - Setup UI - - override func setupHierarchy() { - } - - override func setupLayout() { - } - - override func setupStyle() { - view.do { - $0.backgroundColor = .systemPink - } - } -} - -// MARK: - Private Func - -private extension HankkiDetailViewController { - -} diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/ViewModel/HankkiDetailViewModel.swift b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/ViewModel/HankkiDetailViewModel.swift index 23d28992..b3d306d1 100644 --- a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/ViewModel/HankkiDetailViewModel.swift +++ b/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/ViewModel/HankkiDetailViewModel.swift @@ -13,18 +13,22 @@ import UIKit final class HankkiDetailViewModel { var hankkiId: Int - - var setHankkiDetailData: (() -> Void)? - var showAlert: ((String) -> Void)? - var dismiss: (() -> Void)? - var hankkiDetailData: GetHankkiDetailResponseData? { didSet { setHankkiDetailData?() } } + var removeOptions: [String] = [ + StringLiterals.RemoveHankki.optionDisappeared, + StringLiterals.RemoveHankki.optionNoMore8000, + StringLiterals.RemoveHankki.optionImproperHankki + ] weak var delegate: NetworkResultDelegate? + var setHankkiDetailData: (() -> Void)? + var showAlert: ((String) -> Void)? + var dismiss: (() -> Void)? + init(hankkiId: Int) { self.hankkiId = hankkiId } diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionCollectionViewCell.swift b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/Cell/RemoveOptionCollectionViewCell.swift similarity index 66% rename from Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionCollectionViewCell.swift rename to Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/Cell/RemoveOptionCollectionViewCell.swift index 0589e65e..91f69780 100644 --- a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionCollectionViewCell.swift +++ b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/Cell/RemoveOptionCollectionViewCell.swift @@ -1,5 +1,5 @@ // -// HankkiReportOptionCollectionViewCell.swift +// RemoveOptionCollectionViewCell.swift // Hankkijogbo // // Created by 서은수 on 7/15/24. @@ -7,21 +7,15 @@ import UIKit -/// Cell의 클릭 상태에 따라 FooterView의 버튼 스타일을 변경하기 위한 delegate +/// Cell의 클릭 상태에 따라 제보하기 버튼 스타일을 변경하기 위한 delegate protocol UpdateReportButtonStyleDelegate: AnyObject { func updateReportButtonStyle(isEnabled: Bool) } -final class HankkiReportOptionCollectionViewCell: BaseCollectionViewCell { +final class RemoveOptionCollectionViewCell: BaseCollectionViewCell { // MARK: - Properties - var selectedOptionString: String? { - didSet { - print(selectedOptionString ?? "") - } - } - override var isSelected: Bool { didSet { if isSelected { @@ -42,14 +36,15 @@ final class HankkiReportOptionCollectionViewCell: BaseCollectionViewCell { } } - var optionString: String = "" { + weak var delegate: UpdateReportButtonStyleDelegate? + + private var selectedOptionString: String? + private var optionString: String = "" { didSet { reportOptionLabel.text = optionString } } - weak var delegate: UpdateReportButtonStyleDelegate? - // MARK: - UI Components private var reportOptionLabel: UILabel = UILabel() @@ -72,26 +67,26 @@ final class HankkiReportOptionCollectionViewCell: BaseCollectionViewCell { override func setupLayout() { reportOptionLabel.snp.makeConstraints { $0.centerY.equalToSuperview() - $0.leading.equalToSuperview().inset(20) + $0.leading.equalToSuperview().inset(22) } + radioButton.snp.makeConstraints { $0.centerY.equalToSuperview() - $0.trailing.equalToSuperview().inset(20) + $0.trailing.equalToSuperview().inset(22) $0.size.equalTo(24) } } override func setupStyle() { self.do { - $0.makeRoundBorder(cornerRadius: 10, borderWidth: 1, borderColor: .gray200) $0.backgroundColor = .hankkiWhite } + reportOptionLabel.do { - $0.attributedText = UILabel.setupAttributedText( - for: PretendardStyle.body5, - color: .gray400 - ) + $0.font = .setupPretendardStyle(of: .body6) + $0.textColor = .gray500 } + radioButton.do { $0.setImage(.btnRadioNormal, for: .normal) $0.isUserInteractionEnabled = false @@ -103,17 +98,21 @@ final class HankkiReportOptionCollectionViewCell: BaseCollectionViewCell { } } -private extension HankkiReportOptionCollectionViewCell { +// MARK: - Private Func + +private extension RemoveOptionCollectionViewCell { func setupSelectedStyle() { - self.layer.borderColor = UIColor.red500.cgColor - self.radioButton.setImage(.btnRadioSelected, for: .normal) - self.reportOptionLabel.textColor = .red500 + backgroundColor = .red100 + radioButton.setImage(.btnRadioSelected, for: .normal) + reportOptionLabel.font = .setupPretendardStyle(of: .body5) + reportOptionLabel.textColor = .red500 } func setupNormalStyle() { - self.layer.borderColor = UIColor.gray200.cgColor - self.radioButton.setImage(.btnRadioNormal, for: .normal) - self.reportOptionLabel.textColor = .gray400 + backgroundColor = .hankkiWhite + radioButton.setImage(.btnRadioNormal, for: .normal) + reportOptionLabel.font = .setupPretendardStyle(of: .body6) + reportOptionLabel.textColor = .gray500 } } diff --git a/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift new file mode 100644 index 00000000..b3efa26e --- /dev/null +++ b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift @@ -0,0 +1,183 @@ +// +// RemoveHankkiViewController.swift +// Hankkijogbo +// +// Created by 서은수 on 12/25/24. +// + +import UIKit + +// MARK: - 식당을 삭제하는 제보 화면 + +final class RemoveHankkiViewController: BaseViewController { + + // MARK: - Properties + + var viewModel: HankkiDetailViewModel + + // MARK: - UI Components + + private let titleLabel: UILabel = UILabel() + private let removeOptionCollectionView: RemoveOptionCollectionView = RemoveOptionCollectionView() + private let carefulGuideLabel: UILabel = UILabel() + private lazy var reportBottomButtonView: BottomButtonView = BottomButtonView( + primaryButtonText: StringLiterals.RemoveHankki.reportButton, + primaryButtonHandler: hankkiReportButtonDidTap + ) + + // MARK: - Life Cycle + + init(viewModel: HankkiDetailViewModel) { + self.viewModel = viewModel + super.init() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func viewDidLoad() { + super.viewDidLoad() + + setupRegister() + setupDelegate() + } + + // MARK: - Setup UI + + override func setupHierarchy() { + view.addSubviews( + titleLabel, + removeOptionCollectionView, + reportBottomButtonView, + carefulGuideLabel + ) + } + + override func setupLayout() { + titleLabel.snp.makeConstraints { + $0.top.equalTo(view.safeAreaLayoutGuide).offset(18) + $0.leading.equalToSuperview().inset(22) + } + + removeOptionCollectionView.snp.makeConstraints { + $0.top.equalTo(titleLabel.snp.bottom).offset(30) + $0.leading.trailing.equalToSuperview() + } + + reportBottomButtonView.snp.makeConstraints { + $0.leading.trailing.equalToSuperview() + $0.bottom.equalToSuperview() + $0.height.equalTo(154) + } + + carefulGuideLabel.snp.makeConstraints { + $0.centerX.equalToSuperview() + $0.bottom.equalTo(view.safeAreaLayoutGuide).offset(-87) + } + } + + override func setupStyle() { + titleLabel.do { + $0.numberOfLines = 2 + $0.attributedText = UILabel.setupAttributedText( + for: SuiteStyle.h2, + withText: StringLiterals.RemoveHankki.titleWhyRemove, + color: .gray900 + ) + } + + carefulGuideLabel.do { + $0.attributedText = UILabel.setupAttributedText( + for: SuiteStyle.body3, + withText: StringLiterals.ModifyMenu.modifyCarefullyPlease, + color: .gray400 + ) + } + } +} + +// MARK: - Private Func + +private extension RemoveHankkiViewController { + + func setupRegister() { + removeOptionCollectionView.collectionView.register(RemoveOptionCollectionViewCell.self, forCellWithReuseIdentifier: RemoveOptionCollectionViewCell.className) + } + + func setupDelegate() { + removeOptionCollectionView.collectionView.dataSource = self + removeOptionCollectionView.collectionView.delegate = self + } + + /// 정말 제보하시겠어요? Alert 띄우기 + func showCheckAlertForReport() { + self.showAlert( + titleText: StringLiterals.Alert.reallyReport, + subText: StringLiterals.Alert.disappearInfoByReport, + secondaryButtonText: StringLiterals.Alert.back, + primaryButtonText: StringLiterals.Common.report, + primaryButtonHandler: deleteHankkiByReport + ) + } + + /// 제보를 통한 식당 삭제 + func deleteHankkiByReport() { + viewModel.deleteHankkiAPI { [self] in + showThanksAlert() + } + } + + /// 제보 감사 Alert 띄우기 + func showThanksAlert() { + let nickname: String = UserDefaults.standard.getNickname() + + self.showAlert( + image: .imgModalReport, + titleText: nickname + StringLiterals.Alert.thanksForReport, + primaryButtonText: StringLiterals.Alert.back, + primaryButtonHandler: dismissAlertAndPop, + hightlightedText: nickname, + hightlightedColor: .red500 + ) + } + + /// Alert를 fade out으로 dismiss 시킴과 동시에 VC를 pop + func dismissAlertAndPop() { + self.navigationController?.popViewController(animated: true) + } + + @objc func hankkiReportButtonDidTap() { + showCheckAlertForReport() + } +} + +// MARK: - UICollectionViewDataSource, UICollectionViewDelegate + +extension RemoveHankkiViewController: UICollectionViewDataSource, UICollectionViewDelegate { + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + viewModel.removeOptions.count + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: RemoveOptionCollectionViewCell.className, for: indexPath) as? RemoveOptionCollectionViewCell else { return UICollectionViewCell() } + + cell.bindData(text: viewModel.removeOptions[indexPath.item]) + cell.delegate = self + + return cell + } +} + +// MARK: - UpdateReportButtonStyle Delegate + +extension RemoveHankkiViewController: UpdateReportButtonStyleDelegate { + func updateReportButtonStyle(isEnabled: Bool) { + if isEnabled { + reportBottomButtonView.setupEnabledDoneButton() + } else { + reportBottomButtonView.setupDisabledDoneButton() + } + } +} diff --git a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionCollectionView.swift b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveOptionCollectionView.swift similarity index 68% rename from Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionCollectionView.swift rename to Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveOptionCollectionView.swift index 6b2a0c5f..1bd0dea7 100644 --- a/Hankkijogbo/Hankkijogbo/Present/HankkiDetail/View/Cell/HankkiReportOption/HankkiReportOptionCollectionView.swift +++ b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveOptionCollectionView.swift @@ -1,5 +1,5 @@ // -// HankkiReportOptionCollectionView.swift +// RemoveOptionCollectionView.swift // Hankkijogbo // // Created by 서은수 on 7/15/24. @@ -7,7 +7,7 @@ import UIKit -final class HankkiReportOptionCollectionView: BaseView { +final class RemoveOptionCollectionView: BaseView { // MARK: - UI Components @@ -23,22 +23,20 @@ final class HankkiReportOptionCollectionView: BaseView { override func setupLayout() { collectionView.snp.makeConstraints { $0.edges.equalToSuperview() - $0.width.equalTo(331) - $0.height.equalTo(285) + $0.height.equalTo(172) } } override func setupStyle() { flowLayout.do { - $0.itemSize = .init(width: UIScreen.getDeviceWidth() - 22 * 2, height: 52) $0.scrollDirection = .vertical + $0.itemSize = .init(width: UIScreen.getDeviceWidth(), height: 52) $0.minimumLineSpacing = 8 - $0.headerReferenceSize = .init(width: 252, height: 27) - $0.footerReferenceSize = .init(width: 275, height: 54) - $0.sectionInset = UIEdgeInsets(top: 16, left: 0, bottom: 16, right: 0) } + collectionView.do { $0.backgroundColor = .clear + $0.isScrollEnabled = false } } } From 94ec276ca8446a0979adfeb848f15038e66c93ed Mon Sep 17 00:00:00 2001 From: EunsuSeo01 Date: Thu, 26 Dec 2024 00:53:33 +0900 Subject: [PATCH 3/8] =?UTF-8?q?[Feat]=20#317=20-=20=EC=82=AD=EC=A0=9C=20?= =?UTF-8?q?=EC=A0=9C=EB=B3=B4=20=ED=9B=84=20=ED=99=95=EC=9D=B8=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=20=EC=8B=9C=20=ED=99=88=EC=9C=BC=EB=A1=9C=20pop=20?= =?UTF-8?q?=EB=90=98=EB=8F=84=EB=A1=9D=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/RemoveHankkiViewController.swift | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift index b3efa26e..4e90f810 100644 --- a/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift +++ b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift @@ -22,7 +22,7 @@ final class RemoveHankkiViewController: BaseViewController { private let carefulGuideLabel: UILabel = UILabel() private lazy var reportBottomButtonView: BottomButtonView = BottomButtonView( primaryButtonText: StringLiterals.RemoveHankki.reportButton, - primaryButtonHandler: hankkiReportButtonDidTap + primaryButtonHandler: removeHankkiButtonDidTap ) // MARK: - Life Cycle @@ -111,18 +111,18 @@ private extension RemoveHankkiViewController { } /// 정말 제보하시겠어요? Alert 띄우기 - func showCheckAlertForReport() { + func showCheckAlertForRemove() { self.showAlert( titleText: StringLiterals.Alert.reallyReport, subText: StringLiterals.Alert.disappearInfoByReport, secondaryButtonText: StringLiterals.Alert.back, primaryButtonText: StringLiterals.Common.report, - primaryButtonHandler: deleteHankkiByReport + primaryButtonHandler: removeHankkiByReport ) } /// 제보를 통한 식당 삭제 - func deleteHankkiByReport() { + func removeHankkiByReport() { viewModel.deleteHankkiAPI { [self] in showThanksAlert() } @@ -135,20 +135,26 @@ private extension RemoveHankkiViewController { self.showAlert( image: .imgModalReport, titleText: nickname + StringLiterals.Alert.thanksForReport, - primaryButtonText: StringLiterals.Alert.back, - primaryButtonHandler: dismissAlertAndPop, + primaryButtonText: StringLiterals.Alert.check, + primaryButtonHandler: popToHomeHankkiList, hightlightedText: nickname, hightlightedColor: .red500 ) } - /// Alert를 fade out으로 dismiss 시킴과 동시에 VC를 pop - func dismissAlertAndPop() { - self.navigationController?.popViewController(animated: true) + // 전체 식당 리스트가 떠있는 홈으로 이동 + func popToHomeHankkiList() { + if let viewControllers = self.navigationController?.viewControllers { + if viewControllers.count > 2 { + self.navigationController?.popToViewController(viewControllers[viewControllers.count - 3], animated: true) + } + } } - @objc func hankkiReportButtonDidTap() { - showCheckAlertForReport() + // MARK: - @objc Func + + @objc func removeHankkiButtonDidTap() { + showCheckAlertForRemove() } } From 898fa7da29efa65f199e47f9debac9bfe922b724 Mon Sep 17 00:00:00 2001 From: EunsuSeo01 Date: Thu, 26 Dec 2024 00:54:39 +0900 Subject: [PATCH 4/8] =?UTF-8?q?[Feat]=20#317=20-=20HomeVM=EC=97=90=20?= =?UTF-8?q?=ED=8F=AC=EC=BB=A4=EC=8B=B1=20=EB=90=98=EA=B3=A0=20=EC=9E=88?= =?UTF-8?q?=EB=8A=94=20=EC=8B=9D=EB=8B=B9=EC=9D=98=20Validation=20?= =?UTF-8?q?=ED=99=95=EC=9D=B8=ED=95=98=EB=8A=94=20=ED=95=A8=EC=88=98=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 validate 하지 않으면 즉 삭제된 식당이면 포커싱 제거 후 전체 식당 리스트 띄우게 하려고 --- .../Present/Home/ViewModel/HomeViewModel.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Hankkijogbo/Hankkijogbo/Present/Home/ViewModel/HomeViewModel.swift b/Hankkijogbo/Hankkijogbo/Present/Home/ViewModel/HomeViewModel.swift index be5e5423..6b29ade0 100644 --- a/Hankkijogbo/Hankkijogbo/Present/Home/ViewModel/HomeViewModel.swift +++ b/Hankkijogbo/Hankkijogbo/Present/Home/ViewModel/HomeViewModel.swift @@ -16,6 +16,7 @@ final class HomeViewModel { private let hankkiAPIService: HankkiAPIServiceProtocol var showAlert: ((String) -> Void)? + var showHankkiListBottomSheet: (() -> Void)? var categoryFilters: [GetCategoryFilterData] = [] var priceFilters: [GetPriceFilterData] = [] @@ -155,4 +156,12 @@ extension HomeViewModel { } } } + + // 포커싱하고 있는 식당이 삭제된 식당인지 아닌지 확인 + func checkThumbnailHankkiValidation() { + let isValid = hankkiLists.contains { $0.id == hankkiThumbnail?.id ?? 0 } + if !isValid { + showHankkiListBottomSheet?() + } + } } From 367d87727048b0a62db30806a1d155598e6200c4 Mon Sep 17 00:00:00 2001 From: EunsuSeo01 Date: Thu, 26 Dec 2024 00:55:17 +0900 Subject: [PATCH 5/8] =?UTF-8?q?[Feat]=20#317=20-=20=EC=82=AD=EC=A0=9C?= =?UTF-8?q?=EB=90=9C=20=EC=8B=9D=EB=8B=B9=20=EC=8D=B8=EB=84=A4=EC=9D=BC?= =?UTF-8?q?=EC=9D=B4=EB=A9=B4=20=EC=A0=84=EC=B2=B4=20=EC=8B=9D=EB=8B=B9=20?= =?UTF-8?q?=EB=B0=94=ED=85=80=20=EC=8B=9C=ED=8A=B8=20=EC=98=AC=EB=9D=BC?= =?UTF-8?q?=EC=98=A4=EA=B2=8C=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Present/Home/View/HomeViewController.swift | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Hankkijogbo/Hankkijogbo/Present/Home/View/HomeViewController.swift b/Hankkijogbo/Hankkijogbo/Present/Home/View/HomeViewController.swift index 971892fa..bc8f2f73 100644 --- a/Hankkijogbo/Hankkijogbo/Present/Home/View/HomeViewController.swift +++ b/Hankkijogbo/Hankkijogbo/Present/Home/View/HomeViewController.swift @@ -102,6 +102,9 @@ final class HomeViewController: BaseViewController, NetworkResultDelegate { private func bindViewModel() { viewModel.hankkiListsDidChange = { [weak self] data in guard let self = self else { return } + + self.viewModel.checkThumbnailHankkiValidation() + DispatchQueue.main.async { self.rootView.bottomSheetView.data = data self.rootView.bottomSheetView.updateTotalListCount(count: data.count) @@ -124,6 +127,10 @@ final class HomeViewController: BaseViewController, NetworkResultDelegate { primaryButtonText: StringLiterals.Alert.check) } + viewModel.showHankkiListBottomSheet = { + self.showHankkiListBottomSheet() + } + viewModel.getCategoryFilterAPI { [weak self] success in if success { DispatchQueue.main.async { @@ -245,12 +252,16 @@ private extension HomeViewController { } } } + + func showHankkiListBottomSheet() { + self.rootView.bottomSheetView.viewLayoutIfNeededWithDownAnimation() + self.hideMarkerInfoCard() + } } extension HomeViewController: NMFMapViewTouchDelegate, NMFMapViewCameraDelegate { func mapView(_ mapView: NMFMapView, didTapMap latlng: NMGLatLng, point: CGPoint) { - self.rootView.bottomSheetView.viewLayoutIfNeededWithDownAnimation() - self.hideMarkerInfoCard() + showHankkiListBottomSheet() } } From a4ba4b5cad4c20125dd99893e4636bf2e51f7d44 Mon Sep 17 00:00:00 2001 From: EunsuSeo01 Date: Thu, 26 Dec 2024 23:04:10 +0900 Subject: [PATCH 6/8] =?UTF-8?q?[Design]=20#317=20-=20SE=20=EA=B8=B0?= =?UTF-8?q?=EA=B8=B0=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RemoveHankki/View/RemoveHankkiViewController.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift index 4e90f810..fe9cdeb9 100644 --- a/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift +++ b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift @@ -67,8 +67,12 @@ final class RemoveHankkiViewController: BaseViewController { reportBottomButtonView.snp.makeConstraints { $0.leading.trailing.equalToSuperview() - $0.bottom.equalToSuperview() $0.height.equalTo(154) + if UIScreen.hasNotch { + $0.bottom.equalToSuperview() + } else { + $0.bottom.equalTo(view.safeAreaLayoutGuide).offset(30) // SE 대응 + } } carefulGuideLabel.snp.makeConstraints { From 20929f93e02d7a876b2907d9bd1a1211b3ffa395 Mon Sep 17 00:00:00 2001 From: EunsuSeo01 Date: Thu, 26 Dec 2024 23:51:40 +0900 Subject: [PATCH 7/8] =?UTF-8?q?[Chore]=20#317=20-=20=ED=95=A8=EC=88=98=20?= =?UTF-8?q?=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RemoveHankki/View/RemoveHankkiViewController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift index fe9cdeb9..091d0baf 100644 --- a/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift +++ b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveHankkiViewController.swift @@ -140,14 +140,14 @@ private extension RemoveHankkiViewController { image: .imgModalReport, titleText: nickname + StringLiterals.Alert.thanksForReport, primaryButtonText: StringLiterals.Alert.check, - primaryButtonHandler: popToHomeHankkiList, + primaryButtonHandler: popToThreeStepsBack, hightlightedText: nickname, hightlightedColor: .red500 ) } - // 전체 식당 리스트가 떠있는 홈으로 이동 - func popToHomeHankkiList() { + // 이전의 이전의 이전 화면으로 이동 + func popToThreeStepsBack() { if let viewControllers = self.navigationController?.viewControllers { if viewControllers.count > 2 { self.navigationController?.popToViewController(viewControllers[viewControllers.count - 3], animated: true) From 5eed41921109f9f2b00efda3e1e3fea28db51117 Mon Sep 17 00:00:00 2001 From: EunsuSeo01 Date: Fri, 27 Dec 2024 00:10:27 +0900 Subject: [PATCH 8/8] =?UTF-8?q?[Chore]=20#317=20-=20=EC=BD=94=EB=93=9C?= =?UTF-8?q?=EB=A6=AC=EB=B7=B0=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 불필요한 컬뷰 속성 설정 코드 삭제 --- .../RemoveHankki/View/RemoveOptionCollectionView.swift | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveOptionCollectionView.swift b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveOptionCollectionView.swift index 1bd0dea7..059eb9ae 100644 --- a/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveOptionCollectionView.swift +++ b/Hankkijogbo/Hankkijogbo/Present/RemoveHankki/View/RemoveOptionCollectionView.swift @@ -33,10 +33,5 @@ final class RemoveOptionCollectionView: BaseView { $0.itemSize = .init(width: UIScreen.getDeviceWidth(), height: 52) $0.minimumLineSpacing = 8 } - - collectionView.do { - $0.backgroundColor = .clear - $0.isScrollEnabled = false - } } }