From cd3fcb4f7027ee5516b48972adfdc4f5827c68d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8E=E1=85=AC=E1=84=8C=E1=85=A5=E1=86=BC=E1=84=8B?= =?UTF-8?q?=E1=85=B5=E1=86=AB?= Date: Thu, 12 Mar 2026 14:53:51 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20BaseViewController=EC=97=90=20isShowing?= =?UTF-8?q?TabBar=20=ED=94=84=EB=A1=9C=ED=8D=BC=ED=8B=B0=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 --- .../Sources/Common/Protocol/BaseViewController.swift | 11 +++++------ .../View/ResultRecommendedRoutineViewController.swift | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Projects/Presentation/Sources/Common/Protocol/BaseViewController.swift b/Projects/Presentation/Sources/Common/Protocol/BaseViewController.swift index cc9c487..c6fbde7 100644 --- a/Projects/Presentation/Sources/Common/Protocol/BaseViewController.swift +++ b/Projects/Presentation/Sources/Common/Protocol/BaseViewController.swift @@ -13,8 +13,7 @@ public class BaseViewController: UIViewController { let viewModel: T private var baseCancellables = Set() private lazy var networkErrorView = NetworkErrorView() - private var isShowingNetworkError = false - + var isShowingTabBar: Bool { true } init(viewModel: T) { self.viewModel = viewModel @@ -22,7 +21,7 @@ public class BaseViewController: UIViewController { } deinit { - guard isShowingNetworkError else { return } + guard isShowingTabBar else { return } DispatchQueue.main.async { [weak tabBarController = self.tabBarController] in tabBarController?.tabBar.isHidden = false @@ -78,15 +77,15 @@ public class BaseViewController: UIViewController { /// 네트워크 에러 뷰 를 보이거나 숨깁니다. private func handleNetworkErrorView(show: Bool) { - isShowingNetworkError = show - if show { view.bringSubviewToFront(networkErrorView) networkErrorView.isHidden = false tabBarController?.tabBar.isHidden = true } else { networkErrorView.isHidden = true - tabBarController?.tabBar.isHidden = false + if isShowingTabBar { + tabBarController?.tabBar.isHidden = false + } } } } diff --git a/Projects/Presentation/Sources/ResultRecommendedRoutine/View/ResultRecommendedRoutineViewController.swift b/Projects/Presentation/Sources/ResultRecommendedRoutine/View/ResultRecommendedRoutineViewController.swift index d92e791..e682170 100644 --- a/Projects/Presentation/Sources/ResultRecommendedRoutine/View/ResultRecommendedRoutineViewController.swift +++ b/Projects/Presentation/Sources/ResultRecommendedRoutine/View/ResultRecommendedRoutineViewController.swift @@ -80,6 +80,7 @@ final class ResultRecommendedRoutineViewController: BaseViewController