From e18464f457f13114d7faa4c1a878eedaccec447a Mon Sep 17 00:00:00 2001 From: KTH Date: Tue, 18 Jun 2024 01:23:43 +0900 Subject: [PATCH 1/8] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20[#551]=20PanModal?= =?UTF-8?q?=20>=20FittedSheets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Package.resolved | 9 ++ Package.swift | 1 + .../Dependency+SPM.swift | 1 + .../TextPopUp/TextPopUpFactory.swift | 1 - .../BaseFeature/Resources/Base.storyboard | 9 +- .../Components/TextPopUpComponent.swift | 2 - .../TextPopupViewController.swift | 17 ++-- .../Sources/Views/SongCartView.swift | 2 +- .../MainTabFeature/Resources/Main.storyboard | 7 +- .../MainTabBarViewController.swift | 2 +- .../MyInfo/MyInfoViewController.swift | 7 +- .../Question/QuestionViewController.swift | 6 +- .../Request/RequestViewController.swift | 9 +- .../ServiceInfoViewController.swift | 3 +- .../Setting/SettingViewController.swift | 23 +---- .../PlayerViewController.swift | 4 +- .../PlaylistViewController+Delegate.swift | 2 +- .../PlayListDetailViewController.swift | 3 +- .../PlayListViewController+Delegate.swift | 2 +- .../ViewControllers/IntroViewController.swift | 52 ++++++----- .../BeforeSearchContentViewController.swift | 3 +- .../SearchViewController.swift | 3 +- .../FavoriteViewController.swift | 3 +- .../MyPlayListViewController.swift | 4 +- .../StorageViewController.swift | 3 +- .../FeatureThirdPartyLib/Project.swift | 1 + .../Extension+UIViewController.swift | 91 +++++++++++++++++++ 27 files changed, 170 insertions(+), 100 deletions(-) diff --git a/Package.resolved b/Package.resolved index 48d4af5a6..1f08faa79 100644 --- a/Package.resolved +++ b/Package.resolved @@ -63,6 +63,15 @@ "version" : "10.25.0" } }, + { + "identity" : "fittedsheets", + "kind" : "remoteSourceControl", + "location" : "https://github.com/gordontucker/FittedSheets.git", + "state" : { + "revision" : "5d7f5a6307ad510aa05de5a4a16ac40846d3b2d3", + "version" : "2.6.1" + } + }, { "identity" : "googleappmeasurement", "kind" : "remoteSourceControl", diff --git a/Package.swift b/Package.swift index 268b040c3..7ad1f9593 100644 --- a/Package.swift +++ b/Package.swift @@ -23,6 +23,7 @@ let package = Package( .package(url: "https://github.com/Moya/Moya.git", from: "15.0.3"), .package(url: "https://github.com/onevcat/Kingfisher.git", from: "7.11.0"), .package(url: "https://github.com/slackhq/PanModal.git", from: "1.2.0"), + .package(url: "https://github.com/gordontucker/FittedSheets.git", from: "2.6.1"), .package(url: "https://github.com/ReactiveX/RxSwift.git",from: "6.7.1"), .package(url: "https://github.com/devxoul/Then", from: "3.0.0"), .package(url: "https://github.com/SnapKit/SnapKit.git", from: "5.7.1"), diff --git a/Plugin/DependencyPlugin/ProjectDescriptionHelpers/Dependency+SPM.swift b/Plugin/DependencyPlugin/ProjectDescriptionHelpers/Dependency+SPM.swift index f2250217b..fda1b0741 100644 --- a/Plugin/DependencyPlugin/ProjectDescriptionHelpers/Dependency+SPM.swift +++ b/Plugin/DependencyPlugin/ProjectDescriptionHelpers/Dependency+SPM.swift @@ -9,6 +9,7 @@ public extension TargetDependency.SPM { static let Moya = TargetDependency.external(name: "Moya") static let RxMoya = TargetDependency.external(name: "RxMoya") static let PanModal = TargetDependency.external(name: "PanModal") + static let FittedSheets = TargetDependency.external(name: "FittedSheets") static let RxSwift = TargetDependency.external(name: "RxSwift") static let RxCocoa = TargetDependency.external(name: "RxCocoa") static let Kingfisher = TargetDependency.external(name: "Kingfisher") diff --git a/Projects/Features/BaseFeature/Interface/TextPopUp/TextPopUpFactory.swift b/Projects/Features/BaseFeature/Interface/TextPopUp/TextPopUpFactory.swift index c639c96ba..91f672ef0 100644 --- a/Projects/Features/BaseFeature/Interface/TextPopUp/TextPopUpFactory.swift +++ b/Projects/Features/BaseFeature/Interface/TextPopUp/TextPopUpFactory.swift @@ -4,7 +4,6 @@ public protocol TextPopUpFactory { func makeView( text: String?, cancelButtonIsHidden: Bool, - allowsDragAndTapToDismiss: Bool?, confirmButtonText: String?, cancelButtonText: String?, completion: (() -> Void)?, diff --git a/Projects/Features/BaseFeature/Resources/Base.storyboard b/Projects/Features/BaseFeature/Resources/Base.storyboard index 109ba8d23..96e4a7e0e 100644 --- a/Projects/Features/BaseFeature/Resources/Base.storyboard +++ b/Projects/Features/BaseFeature/Resources/Base.storyboard @@ -1,9 +1,9 @@ - + - + @@ -339,6 +339,7 @@ + @@ -500,7 +501,7 @@ - + @@ -512,7 +513,7 @@ - + diff --git a/Projects/Features/BaseFeature/Sources/Components/TextPopUpComponent.swift b/Projects/Features/BaseFeature/Sources/Components/TextPopUpComponent.swift index 3d0193e92..611aa3c8e 100644 --- a/Projects/Features/BaseFeature/Sources/Components/TextPopUpComponent.swift +++ b/Projects/Features/BaseFeature/Sources/Components/TextPopUpComponent.swift @@ -6,7 +6,6 @@ public final class TextPopUpComponent: Component, TextPopUpFact public func makeView( text: String?, cancelButtonIsHidden: Bool, - allowsDragAndTapToDismiss: Bool?, confirmButtonText: String?, cancelButtonText: String?, completion: (() -> Void)?, @@ -15,7 +14,6 @@ public final class TextPopUpComponent: Component, TextPopUpFact return TextPopupViewController.viewController( text: text ?? "", cancelButtonIsHidden: cancelButtonIsHidden, - allowsDragAndTapToDismiss: allowsDragAndTapToDismiss ?? true, confirmButtonText: confirmButtonText ?? "확인", cancelButtonText: cancelButtonText ?? "취소", completion: completion, diff --git a/Projects/Features/BaseFeature/Sources/ViewControllers/TextPopupViewController.swift b/Projects/Features/BaseFeature/Sources/ViewControllers/TextPopupViewController.swift index aa2e4919d..464c80c8d 100644 --- a/Projects/Features/BaseFeature/Sources/ViewControllers/TextPopupViewController.swift +++ b/Projects/Features/BaseFeature/Sources/ViewControllers/TextPopupViewController.swift @@ -12,7 +12,6 @@ public final class TextPopupViewController: UIViewController, ViewControllerFrom var cancelButtonIsHidden: Bool = false var completion: (() -> Void)? var cancelCompletion: (() -> Void)? - var allowsDragAndTapToDismiss: Bool = true var cancelButtonText: String = "" var confirmButtonText: String = "" @@ -29,7 +28,6 @@ public final class TextPopupViewController: UIViewController, ViewControllerFrom public static func viewController( text: String = "", cancelButtonIsHidden: Bool, - allowsDragAndTapToDismiss: Bool = true, confirmButtonText: String = "확인", cancelButtonText: String = "취소", completion: (() -> Void)? = nil, @@ -39,7 +37,6 @@ public final class TextPopupViewController: UIViewController, ViewControllerFrom let viewController = TextPopupViewController.viewController(storyBoardName: "Base", bundle: Bundle.module) viewController.contentString = text viewController.cancelButtonIsHidden = cancelButtonIsHidden - viewController.allowsDragAndTapToDismiss = allowsDragAndTapToDismiss viewController.completion = completion viewController.cancelCompletion = cancelCompletion viewController.confirmButtonText = confirmButtonText @@ -48,13 +45,15 @@ public final class TextPopupViewController: UIViewController, ViewControllerFrom } @IBAction func cancelButtonAction(_ sender: Any) { - dismiss(animated: true) - cancelCompletion?() + dismiss(animated: true, completion: { [cancelCompletion] in + cancelCompletion?() + }) } @IBAction func confirmButtonAction(_ sender: Any) { - dismiss(animated: true) - completion?() + dismiss(animated: true, completion: { [completion] in + completion?() + }) } } @@ -155,10 +154,10 @@ extension TextPopupViewController: PanModalPresentable { } public var allowsDragToDismiss: Bool { - return allowsDragAndTapToDismiss + return true } public var allowsTapToDismiss: Bool { - return allowsDragAndTapToDismiss + return true } } diff --git a/Projects/Features/BaseFeature/Sources/Views/SongCartView.swift b/Projects/Features/BaseFeature/Sources/Views/SongCartView.swift index 38c0b97d0..94240cd19 100644 --- a/Projects/Features/BaseFeature/Sources/Views/SongCartView.swift +++ b/Projects/Features/BaseFeature/Sources/Views/SongCartView.swift @@ -243,6 +243,6 @@ extension SongCartView { } ) guard let parent = self.parentViewController() else { return } - parent.showPanModal(content: viewController) + parent.showFittedSheets(content: viewController) } } diff --git a/Projects/Features/MainTabFeature/Resources/Main.storyboard b/Projects/Features/MainTabFeature/Resources/Main.storyboard index 1e98276fc..012cd0691 100644 --- a/Projects/Features/MainTabFeature/Resources/Main.storyboard +++ b/Projects/Features/MainTabFeature/Resources/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -259,6 +259,7 @@ + @@ -276,7 +277,7 @@ - + diff --git a/Projects/Features/MainTabFeature/Sources/ViewControllers/MainTabBarViewController.swift b/Projects/Features/MainTabFeature/Sources/ViewControllers/MainTabBarViewController.swift index 598d50a12..c0c92b215 100644 --- a/Projects/Features/MainTabFeature/Sources/ViewControllers/MainTabBarViewController.swift +++ b/Projects/Features/MainTabFeature/Sources/ViewControllers/MainTabBarViewController.swift @@ -103,7 +103,7 @@ private extension MainTabBarViewController { .bind(with: self) { owner, model in let viewController = owner.noticePopupComponent.makeView(model: model) viewController.delegate = owner - owner.showPanModal(content: viewController) + owner.showFittedSheets(content: viewController) } .disposed(by: disposeBag) } diff --git a/Projects/Features/MyInfoFeature/Sources/ViewControllers/MyInfo/MyInfoViewController.swift b/Projects/Features/MyInfoFeature/Sources/ViewControllers/MyInfo/MyInfoViewController.swift index 0894296c7..2e4c77e63 100644 --- a/Projects/Features/MyInfoFeature/Sources/ViewControllers/MyInfo/MyInfoViewController.swift +++ b/Projects/Features/MyInfoFeature/Sources/ViewControllers/MyInfo/MyInfoViewController.swift @@ -101,7 +101,6 @@ final class MyInfoViewController: BaseReactorViewController { guard let vc = owner.textPopUpFactory.makeView( text: "로그인이 필요한 서비스입니다.\n로그인 하시겠습니까?", cancelButtonIsHidden: false, - allowsDragAndTapToDismiss: nil, confirmButtonText: nil, cancelButtonText: nil, completion: { @@ -112,11 +111,7 @@ final class MyInfoViewController: BaseReactorViewController { ) as? TextPopupViewController else { return } - - vc.modalPresentationStyle = .popover - owner.present(vc, animated: true) - #warning("팬모달 이슈 해결되면 변경 예정") - // owner.showPanModal(content: vc) + owner.showFittedSheets(content: vc) } case .faq: let vc = owner.faqComponent.makeView() diff --git a/Projects/Features/MyInfoFeature/Sources/ViewControllers/Question/QuestionViewController.swift b/Projects/Features/MyInfoFeature/Sources/ViewControllers/Question/QuestionViewController.swift index 14d3c6f17..a05e46954 100644 --- a/Projects/Features/MyInfoFeature/Sources/ViewControllers/Question/QuestionViewController.swift +++ b/Projects/Features/MyInfoFeature/Sources/ViewControllers/Question/QuestionViewController.swift @@ -254,7 +254,6 @@ extension QuestionViewController { guard let textPopupViewController = self.textPopUpFactory.makeView( text: text, cancelButtonIsHidden: false, - allowsDragAndTapToDismiss: nil, confirmButtonText: "다음", cancelButtonText: "충족 기준 보기", completion: { @@ -269,8 +268,8 @@ extension QuestionViewController { ) as? TextPopupViewController else { return } + self.showFittedSheets(content: textPopupViewController) - self.showPanModal(content: textPopupViewController) } else { self.goToMail(source: source) } @@ -309,7 +308,6 @@ extension QuestionViewController { guard let textPopupViewController = self.textPopUpFactory.makeView( text: "메일 계정이 설정되어 있지 않습니다.\n설정 > Mail 앱 > 계정을 설정해주세요.", cancelButtonIsHidden: true, - allowsDragAndTapToDismiss: nil, confirmButtonText: "확인", cancelButtonText: nil, completion: nil, @@ -318,7 +316,7 @@ extension QuestionViewController { return } - self.showPanModal(content: textPopupViewController) + self.showFittedSheets(content: textPopupViewController) } } } diff --git a/Projects/Features/MyInfoFeature/Sources/ViewControllers/Request/RequestViewController.swift b/Projects/Features/MyInfoFeature/Sources/ViewControllers/Request/RequestViewController.swift index b496cc049..465dc1a16 100644 --- a/Projects/Features/MyInfoFeature/Sources/ViewControllers/Request/RequestViewController.swift +++ b/Projects/Features/MyInfoFeature/Sources/ViewControllers/Request/RequestViewController.swift @@ -62,7 +62,6 @@ public final class RequestViewController: UIViewController, ViewControllerFromSt guard let secondConfirmVc = textPopUpFactory.makeView( text: "정말 탈퇴하시겠습니까?", cancelButtonIsHidden: false, - allowsDragAndTapToDismiss: nil, confirmButtonText: nil, cancelButtonText: nil, completion: { [weak self] in @@ -79,21 +78,20 @@ public final class RequestViewController: UIViewController, ViewControllerFromSt guard let firstConfirmVc = textPopUpFactory.makeView( text: "회원탈퇴 신청을 하시겠습니까?", cancelButtonIsHidden: false, - allowsDragAndTapToDismiss: nil, confirmButtonText: nil, cancelButtonText: nil, completion: { [weak self] in guard let self else { return } - self.showPanModal(content: secondConfirmVc) + self.showFittedSheets(content: secondConfirmVc) }, cancelCompletion: nil ) as? TextPopupViewController else { return } - self.showPanModal(content: firstConfirmVc) + self.showFittedSheets(content: firstConfirmVc) } var viewModel: RequestViewModel! @@ -243,7 +241,6 @@ extension RequestViewController { guard let textPopUpViewController = textPopUpFactory.makeView( text: (status == 200) ? "회원탈퇴가 완료되었습니다.\n이용해주셔서 감사합니다." : $0.description, cancelButtonIsHidden: true, - allowsDragAndTapToDismiss: nil, confirmButtonText: nil, cancelButtonText: nil, completion: { [weak self] in @@ -259,7 +256,7 @@ extension RequestViewController { return } - self.showPanModal(content: textPopUpViewController) + self.showFittedSheets(content: textPopUpViewController) }) .disposed(by: disposeBag) diff --git a/Projects/Features/MyInfoFeature/Sources/ViewControllers/ServiceInfo/ServiceInfoViewController.swift b/Projects/Features/MyInfoFeature/Sources/ViewControllers/ServiceInfo/ServiceInfoViewController.swift index 988fbd9a3..c7e42b0b5 100644 --- a/Projects/Features/MyInfoFeature/Sources/ViewControllers/ServiceInfo/ServiceInfoViewController.swift +++ b/Projects/Features/MyInfoFeature/Sources/ViewControllers/ServiceInfo/ServiceInfoViewController.swift @@ -97,7 +97,6 @@ extension ServiceInfoViewController { guard let textPopupVC = owner.textPopUpFactory.makeView( text: "캐시 데이터(\(sizeString))를 지우시겠습니까?", cancelButtonIsHidden: false, - allowsDragAndTapToDismiss: nil, confirmButtonText: nil, cancelButtonText: nil, completion: { owner.viewModel.input.removeCache.onNext(()) }, @@ -106,7 +105,7 @@ extension ServiceInfoViewController { return } - owner.showPanModal(content: textPopupVC) + owner.showFittedSheets(content: textPopupVC) }).disposed(by: disposeBag) viewModel.output diff --git a/Projects/Features/MyInfoFeature/Sources/ViewControllers/Setting/SettingViewController.swift b/Projects/Features/MyInfoFeature/Sources/ViewControllers/Setting/SettingViewController.swift index 69bc86b20..6fca4f17a 100644 --- a/Projects/Features/MyInfoFeature/Sources/ViewControllers/Setting/SettingViewController.swift +++ b/Projects/Features/MyInfoFeature/Sources/ViewControllers/Setting/SettingViewController.swift @@ -75,7 +75,6 @@ final class SettingViewController: BaseReactorViewController { guard let textPopupVC = owner.textPopUpFactory.makeView( text: "캐시 데이터(\(cachSize))를 지우시겠습니까?", cancelButtonIsHidden: false, - allowsDragAndTapToDismiss: nil, confirmButtonText: nil, cancelButtonText: nil, completion: { @@ -85,10 +84,7 @@ final class SettingViewController: BaseReactorViewController { ) as? TextPopupViewController else { return } - #warning("팬모달 이슈 해결되면 변경 예정") - textPopupVC.modalPresentationStyle = .popover - owner.present(textPopupVC, animated: true) - // owner.showPanModal(content: textPopupVC) + owner.showFittedSheets(content: textPopupVC) }) .disposed(by: disposeBag) @@ -108,7 +104,6 @@ final class SettingViewController: BaseReactorViewController { guard let secondConfirmVC = owner.textPopUpFactory.makeView( text: "정말 탈퇴하시겠습니까?", cancelButtonIsHidden: false, - allowsDragAndTapToDismiss: nil, confirmButtonText: nil, cancelButtonText: nil, completion: { @@ -121,22 +116,16 @@ final class SettingViewController: BaseReactorViewController { guard let firstConfirmVC = owner.textPopUpFactory.makeView( text: "회원탈퇴 신청을 하시겠습니까?", cancelButtonIsHidden: false, - allowsDragAndTapToDismiss: nil, confirmButtonText: nil, cancelButtonText: nil, completion: { - #warning("팬모달 이슈 해결되면 변경 예정") - secondConfirmVC.modalPresentationStyle = .popover - owner.present(secondConfirmVC, animated: true) - // owner.showPanModal(content: secondConfirmVC) + owner.showFittedSheets(content: secondConfirmVC) }, cancelCompletion: nil ) as? TextPopupViewController else { return } - #warning("팬모달 이슈 해결되면 변경 예정") - owner.present(firstConfirmVC, animated: true) - // self.showPanModal(content: firstConfirmVC) + owner.showFittedSheets(content: firstConfirmVC) }) .disposed(by: disposeBag) @@ -148,7 +137,6 @@ final class SettingViewController: BaseReactorViewController { guard let textPopUpVC = owner.textPopUpFactory.makeView( text: (status == 200) ? "회원탈퇴가 완료되었습니다.\n이용해주셔서 감사합니다." : description, cancelButtonIsHidden: true, - allowsDragAndTapToDismiss: nil, confirmButtonText: nil, cancelButtonText: nil, completion: { @@ -160,10 +148,7 @@ final class SettingViewController: BaseReactorViewController { ) as? TextPopupViewController else { return } - #warning("팬모달 이슈 해결되면 변경 예정") - textPopUpVC.modalPresentationStyle = .popover - owner.present(textPopUpVC, animated: true) - // owner.showPanModal(content: textPopUpVC) + owner.showFittedSheets(content: textPopUpVC) } .disposed(by: disposeBag) } diff --git a/Projects/Features/PlayerFeature/Sources/ViewControllers/PlayerViewController.swift b/Projects/Features/PlayerFeature/Sources/ViewControllers/PlayerViewController.swift index 28178cf8e..2e6063033 100644 --- a/Projects/Features/PlayerFeature/Sources/ViewControllers/PlayerViewController.swift +++ b/Projects/Features/PlayerFeature/Sources/ViewControllers/PlayerViewController.swift @@ -168,7 +168,7 @@ private extension PlayerViewController { private func bindShowTokenModal(output: PlayerViewModel.Output) { output.showTokenModal.sink { [weak self] message in - self?.showPanModal( + self?.showFittedSheets( content: TextPopupViewController.viewController( text: message, cancelButtonIsHidden: true, @@ -376,7 +376,7 @@ private extension PlayerViewController { private func bindShowConfirmModal(output: PlayerViewModel.Output) { output.showConfirmModal.sink { [weak self] message in - self?.showPanModal(content: TextPopupViewController.viewController( + self?.showFittedSheets(content: TextPopupViewController.viewController( text: message, cancelButtonIsHidden: false, completion: { diff --git a/Projects/Features/PlayerFeature/Sources/ViewControllers/PlaylistViewController+Delegate.swift b/Projects/Features/PlayerFeature/Sources/ViewControllers/PlaylistViewController+Delegate.swift index 51bf20445..c65c091f8 100644 --- a/Projects/Features/PlayerFeature/Sources/ViewControllers/PlaylistViewController+Delegate.swift +++ b/Projects/Features/PlayerFeature/Sources/ViewControllers/PlaylistViewController+Delegate.swift @@ -32,7 +32,7 @@ extension PlaylistViewController: SongCartViewDelegate { self.hideSongCart() } ) - self.showPanModal(content: popup) + self.showFittedSheets(content: popup) default: return } diff --git a/Projects/Features/PlaylistFeature/Sources/ViewControllers/PlayListDetailViewController.swift b/Projects/Features/PlaylistFeature/Sources/ViewControllers/PlayListDetailViewController.swift index fb1e8bb51..1a1010e63 100644 --- a/Projects/Features/PlaylistFeature/Sources/ViewControllers/PlayListDetailViewController.swift +++ b/Projects/Features/PlaylistFeature/Sources/ViewControllers/PlayListDetailViewController.swift @@ -262,7 +262,6 @@ internal class PlayListDetailViewController: BaseStoryboardReactorViewController guard let textPopUpVC = owner.textPopUpFactory.makeView( text: "변경된 내용을 저장할까요?", cancelButtonIsHidden: false, - allowsDragAndTapToDismiss: nil, confirmButtonText: nil, cancelButtonText: nil, completion: { owner.reactor?.action.onNext(.save) }, @@ -271,7 +270,7 @@ internal class PlayListDetailViewController: BaseStoryboardReactorViewController return } - owner.showPanModal(content: textPopUpVC) + owner.showFittedSheets(content: textPopUpVC) } else { owner.navigationController?.popViewController(animated: true) diff --git a/Projects/Features/PlaylistFeature/Sources/ViewControllers/PlayListViewController+Delegate.swift b/Projects/Features/PlaylistFeature/Sources/ViewControllers/PlayListViewController+Delegate.swift index 51bf20445..c65c091f8 100644 --- a/Projects/Features/PlaylistFeature/Sources/ViewControllers/PlayListViewController+Delegate.swift +++ b/Projects/Features/PlaylistFeature/Sources/ViewControllers/PlayListViewController+Delegate.swift @@ -32,7 +32,7 @@ extension PlaylistViewController: SongCartViewDelegate { self.hideSongCart() } ) - self.showPanModal(content: popup) + self.showFittedSheets(content: popup) default: return } diff --git a/Projects/Features/RootFeature/Sources/ViewControllers/IntroViewController.swift b/Projects/Features/RootFeature/Sources/ViewControllers/IntroViewController.swift index c6f8bb445..74c66c7f4 100644 --- a/Projects/Features/RootFeature/Sources/ViewControllers/IntroViewController.swift +++ b/Projects/Features/RootFeature/Sources/ViewControllers/IntroViewController.swift @@ -95,17 +95,18 @@ private extension IntroViewController { return case .offline: - owner.showPanModal( + owner.showFittedSheets( content: owner.textPopUpFactory.makeView( text: entity.description, cancelButtonIsHidden: true, - allowsDragAndTapToDismiss: false, confirmButtonText: "재시도", cancelButtonText: nil, completion: { owner.input.fetchAppCheck.onNext(()) - }, cancelCompletion: nil - ) as? TextPopupViewController ?? .init() + }, + cancelCompletion: nil + ), + dismissOnOverlayTapAndPull: false ) return @@ -113,19 +114,18 @@ private extension IntroViewController { textPopupVc = owner.textPopUpFactory.makeView( text: "\(entity.title)\(entity.description.isEmpty ? "" : "\n")\(entity.description)", cancelButtonIsHidden: true, - allowsDragAndTapToDismiss: false, confirmButtonText: nil, cancelButtonText: nil, completion: { exit(0) - }, cancelCompletion: nil + }, + cancelCompletion: nil ) as? TextPopupViewController ?? .init() case .update: textPopupVc = owner.textPopUpFactory.makeView( text: "\(updateTitle)\n\(updateMessage)", cancelButtonIsHidden: false, - allowsDragAndTapToDismiss: false, confirmButtonText: "업데이트", cancelButtonText: "나중에", completion: { @@ -140,7 +140,6 @@ private extension IntroViewController { textPopupVc = owner.textPopUpFactory.makeView( text: "\(updateTitle)\n\(updateMessage)", cancelButtonIsHidden: true, - allowsDragAndTapToDismiss: false, confirmButtonText: "업데이트", cancelButtonText: nil, completion: { @@ -150,25 +149,28 @@ private extension IntroViewController { ) as? TextPopupViewController ?? .init() } - owner.showPanModal(content: textPopupVc) + owner.showFittedSheets( + content: textPopupVc, + dismissOnOverlayTapAndPull: false + ) - #warning("도메인 변경으로 항상 failure") + #warning("도메인 변경으로 항상 failure > showTabBar() 호출은 추후 지워야 함") case let .failure(error): owner.lottiePlay(specialLogo: false) owner.showTabBar() /* - owner.showPanModal( - content: owner.textPopUpFactory.makeView( - text: error.asWMError.errorDescription ?? "", - cancelButtonIsHidden: true, - allowsDragAndTapToDismiss: false, - confirmButtonText: nil, - cancelButtonText: nil, - completion: nil, - cancelCompletion: nil - ) as? TextPopupViewController ?? .init() - ) - */ + owner.showFittedSheets( + content: owner.textPopUpFactory.makeView( + text: error.asWMError.errorDescription ?? "", + cancelButtonIsHidden: true, + confirmButtonText: nil, + cancelButtonText: nil, + completion: nil, + cancelCompletion: nil + ), + dismissOnOverlayTapAndPull: false + ) + */ } }) .disposed(by: disposeBag) @@ -189,18 +191,18 @@ private extension IntroViewController { owner.showTabBar() case let .failure(error): - owner.showPanModal( + owner.showFittedSheets( content: owner.textPopUpFactory.makeView( text: error.asWMError.errorDescription ?? "", cancelButtonIsHidden: true, - allowsDragAndTapToDismiss: false, confirmButtonText: nil, cancelButtonText: nil, completion: { owner.showTabBar() }, cancelCompletion: nil - ) as? TextPopupViewController ?? .init() + ), + dismissOnOverlayTapAndPull: false ) } }) diff --git a/Projects/Features/SearchFeature/Sources/ViewControllers/BeforeSearchContentViewController.swift b/Projects/Features/SearchFeature/Sources/ViewControllers/BeforeSearchContentViewController.swift index f358e22cd..4ffd93199 100644 --- a/Projects/Features/SearchFeature/Sources/ViewControllers/BeforeSearchContentViewController.swift +++ b/Projects/Features/SearchFeature/Sources/ViewControllers/BeforeSearchContentViewController.swift @@ -180,7 +180,6 @@ extension BeforeSearchContentViewController: UITableViewDelegate { guard let self = self, let textPopupViewController = self.textPopUpFactory.makeView( text: "전체 내역을 삭제하시겠습니까?", cancelButtonIsHidden: false, - allowsDragAndTapToDismiss: nil, confirmButtonText: nil, cancelButtonText: nil, completion: { Utility.PreferenceManager.recentRecords = nil }, @@ -189,7 +188,7 @@ extension BeforeSearchContentViewController: UITableViewDelegate { return } - self.showPanModal(content: textPopupViewController) + self.showFittedSheets(content: textPopupViewController) } if (Utility.PreferenceManager.recentRecords ?? []).isEmpty { diff --git a/Projects/Features/SearchFeature/Sources/ViewControllers/SearchViewController.swift b/Projects/Features/SearchFeature/Sources/ViewControllers/SearchViewController.swift index e4784c524..8f42253e0 100644 --- a/Projects/Features/SearchFeature/Sources/ViewControllers/SearchViewController.swift +++ b/Projects/Features/SearchFeature/Sources/ViewControllers/SearchViewController.swift @@ -114,7 +114,6 @@ internal final class SearchViewController: BaseStoryboardReactorViewController Date: Tue, 18 Jun 2024 01:23:51 +0900 Subject: [PATCH 2/8] =?UTF-8?q?=F0=9F=8E=A8=20::=20=EC=BD=94=EB=93=9C=20Fo?= =?UTF-8?q?rmatting=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewControllers/IntroViewController.swift | 26 +++++++++---------- .../Extension+UIViewController.swift | 4 +-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Projects/Features/RootFeature/Sources/ViewControllers/IntroViewController.swift b/Projects/Features/RootFeature/Sources/ViewControllers/IntroViewController.swift index 74c66c7f4..b6b605196 100644 --- a/Projects/Features/RootFeature/Sources/ViewControllers/IntroViewController.swift +++ b/Projects/Features/RootFeature/Sources/ViewControllers/IntroViewController.swift @@ -154,23 +154,23 @@ private extension IntroViewController { dismissOnOverlayTapAndPull: false ) - #warning("도메인 변경으로 항상 failure > showTabBar() 호출은 추후 지워야 함") + #warning("도메인 변경으로 항상 failure > showTabBar() 호출은 추후 지워야 함") case let .failure(error): owner.lottiePlay(specialLogo: false) owner.showTabBar() /* - owner.showFittedSheets( - content: owner.textPopUpFactory.makeView( - text: error.asWMError.errorDescription ?? "", - cancelButtonIsHidden: true, - confirmButtonText: nil, - cancelButtonText: nil, - completion: nil, - cancelCompletion: nil - ), - dismissOnOverlayTapAndPull: false - ) - */ + owner.showFittedSheets( + content: owner.textPopUpFactory.makeView( + text: error.asWMError.errorDescription ?? "", + cancelButtonIsHidden: true, + confirmButtonText: nil, + cancelButtonText: nil, + completion: nil, + cancelCompletion: nil + ), + dismissOnOverlayTapAndPull: false + ) + */ } }) .disposed(by: disposeBag) diff --git a/Projects/Modules/Utility/Sources/Extensions/Extension+UIViewController.swift b/Projects/Modules/Utility/Sources/Extensions/Extension+UIViewController.swift index 2ea6d4b6a..7b5e35529 100644 --- a/Projects/Modules/Utility/Sources/Extensions/Extension+UIViewController.swift +++ b/Projects/Modules/Utility/Sources/Extensions/Extension+UIViewController.swift @@ -117,10 +117,10 @@ public extension UIViewController { // Disable the ability to pull down to dismiss the modal sheetController.dismissOnPull = dismissOnOverlayTapAndPull - /// Allow pulling past the maximum height and bounce back. Defaults to true. + // Allow pulling past the maximum height and bounce back. Defaults to true. sheetController.allowPullingPastMaxHeight = false - /// Automatically grow/move the sheet to accomidate the keyboard. Defaults to true. + // Automatically grow/move the sheet to accomidate the keyboard. Defaults to true. sheetController.autoAdjustToKeyboard = true // Color of the sheet anywhere the child view controller may not show (or is transparent), From 4575069958af616a4d2c701827375b0568aa0a6e Mon Sep 17 00:00:00 2001 From: youn9k Date: Tue, 18 Jun 2024 10:21:19 +0900 Subject: [PATCH 3/8] =?UTF-8?q?=F0=9F=90=9B=20::=20=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EB=A7=A4=EA=B0=9C?= =?UTF-8?q?=EB=B3=80=EC=88=98=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Features/BaseFeature/Testing/TextPopUpComponentStub.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/Projects/Features/BaseFeature/Testing/TextPopUpComponentStub.swift b/Projects/Features/BaseFeature/Testing/TextPopUpComponentStub.swift index 26cffde63..0e51ccbbd 100644 --- a/Projects/Features/BaseFeature/Testing/TextPopUpComponentStub.swift +++ b/Projects/Features/BaseFeature/Testing/TextPopUpComponentStub.swift @@ -6,7 +6,6 @@ public final class TextPopUpComponentStub: TextPopUpFactory { public func makeView( text: String?, cancelButtonIsHidden: Bool, - allowsDragAndTapToDismiss: Bool?, confirmButtonText: String?, cancelButtonText: String?, completion: (() -> Void)?, @@ -15,7 +14,6 @@ public final class TextPopUpComponentStub: TextPopUpFactory { return TextPopupViewController.viewController( text: text ?? "", cancelButtonIsHidden: cancelButtonIsHidden, - allowsDragAndTapToDismiss: allowsDragAndTapToDismiss ?? true, confirmButtonText: confirmButtonText ?? "확인", cancelButtonText: cancelButtonText ?? "취소", completion: completion, From 10d0f95436f9a23e3d602b75786bdd9bd52542e1 Mon Sep 17 00:00:00 2001 From: "pikagreen@nate.com" Date: Tue, 18 Jun 2024 13:22:47 +0900 Subject: [PATCH 4/8] =?UTF-8?q?=F0=9F=92=84=20::=20[#551]=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseFeature/Resources/Base.storyboard | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Projects/Features/BaseFeature/Resources/Base.storyboard b/Projects/Features/BaseFeature/Resources/Base.storyboard index 96e4a7e0e..6e028385b 100644 --- a/Projects/Features/BaseFeature/Resources/Base.storyboard +++ b/Projects/Features/BaseFeature/Resources/Base.storyboard @@ -400,7 +400,7 @@ - + @@ -427,13 +427,19 @@