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