Skip to content

Commit 23cb470

Browse files
committed
feat: 설정 화면 구현
1 parent f979a14 commit 23cb470

4 files changed

Lines changed: 492 additions & 3 deletions

File tree

Projects/Presentation/Sources/Common/PresentationDependencyAssembler.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,9 @@ public struct PresentationDependencyAssembler: DependencyAssemblerProtocol {
7676

7777
return ResultRecommendedRoutineViewModel(resultRecommendedRoutineUseCase: resultRecommendedRoutineUseCase)
7878
}
79+
80+
DIContainer.shared.register(type: SettingViewModel.self) { _ in
81+
return SettingViewModel()
82+
}
7983
}
8084
}

Projects/Presentation/Sources/MyPage/View/MypageView.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ final class MypageView: BaseViewController<MypageViewModel> {
4545
title = "마이페이지"
4646

4747
settingButton.action = #selector(settingButtonTapped)
48+
settingButton.target = self
4849
settingButton.tintColor = .black
4950
settingButton.image = BitnagilIcon
5051
.settingIcon?
@@ -60,10 +61,11 @@ final class MypageView: BaseViewController<MypageViewModel> {
6061

6162
dividerView.backgroundColor = BitnagilColor.gray99
6263

63-
tableView.register(MypageTableViewCell.self, forCellReuseIdentifier: MypageTableViewCell.className)
64+
tableView.register(BitnagilChevronTableViewCell.self, forCellReuseIdentifier: BitnagilChevronTableViewCell.className)
6465
tableView.dataSource = self
6566
tableView.delegate = self
6667
tableView.separatorStyle = .none
68+
tableView.bounces = false
6769
}
6870

6971
override func configureLayout() {
@@ -114,7 +116,9 @@ final class MypageView: BaseViewController<MypageViewModel> {
114116
}
115117

116118
@objc private func settingButtonTapped() {
117-
// TODO: - 추후 설정 페이지 연결
119+
guard let settingViewModel = Shared.DIContainer.shared.resolve(type: SettingViewModel.self) else { return }
120+
let settingView = SettingView(viewModel: settingViewModel)
121+
navigationController?.pushViewController(settingView, animated: true)
118122
}
119123
}
120124

@@ -132,7 +136,7 @@ extension MypageView: UITableViewDataSource {
132136
}
133137

134138
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
135-
guard let cell = tableView.dequeueReusableCell(withIdentifier: MypageTableViewCell.className) as? MypageTableViewCell else {
139+
guard let cell = tableView.dequeueReusableCell(withIdentifier: BitnagilChevronTableViewCell.className) as? BitnagilChevronTableViewCell else {
136140
return .init()
137141
}
138142

0 commit comments

Comments
 (0)