Skip to content

Commit a681294

Browse files
authored
fix: BaseViewController에 isShowingTabBar 프로퍼티 추가
1 parent cec9be8 commit a681294

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Projects/Presentation/Sources/Common/Protocol/BaseViewController.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@ public class BaseViewController<T: ViewModel>: UIViewController {
1313
let viewModel: T
1414
private var baseCancellables = Set<AnyCancellable>()
1515
private lazy var networkErrorView = NetworkErrorView()
16-
private var isShowingNetworkError = false
17-
16+
var isShowingTabBar: Bool { true }
1817

1918
init(viewModel: T) {
2019
self.viewModel = viewModel
2120
super.init(nibName: nil, bundle: nil)
2221
}
2322

2423
deinit {
25-
guard isShowingNetworkError else { return }
24+
guard isShowingTabBar else { return }
2625

2726
DispatchQueue.main.async { [weak tabBarController = self.tabBarController] in
2827
tabBarController?.tabBar.isHidden = false
@@ -78,15 +77,15 @@ public class BaseViewController<T: ViewModel>: UIViewController {
7877

7978
/// 네트워크 에러 뷰 를 보이거나 숨깁니다.
8079
private func handleNetworkErrorView(show: Bool) {
81-
isShowingNetworkError = show
82-
8380
if show {
8481
view.bringSubviewToFront(networkErrorView)
8582
networkErrorView.isHidden = false
8683
tabBarController?.tabBar.isHidden = true
8784
} else {
8885
networkErrorView.isHidden = true
89-
tabBarController?.tabBar.isHidden = false
86+
if isShowingTabBar {
87+
tabBarController?.tabBar.isHidden = false
88+
}
9089
}
9190
}
9291
}

Projects/Presentation/Sources/ResultRecommendedRoutine/View/ResultRecommendedRoutineViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ final class ResultRecommendedRoutineViewController: BaseViewController<ResultRec
8080
static let skipButtonBottomSpacing: CGFloat = 20
8181
}
8282

83+
override var isShowingTabBar: Bool { false }
8384
private let mainLabel = UILabel()
8485
private var subLabel = UILabel()
8586
private let recommendedRoutineStackView = UIStackView()

0 commit comments

Comments
 (0)