@@ -14,7 +14,7 @@ final class MypageView: BaseViewController<MypageViewModel> {
1414 private enum Layout {
1515 static let profileImageViewSize : CGFloat = 80
1616 static let profileImageViewCornerRadius : CGFloat = profileImageViewSize / 2
17- static let profileImageViewTopSpacing : CGFloat = 32
17+ static let profileImageViewTopSpacing : CGFloat = 74
1818 static let nicknameLabelHeight : CGFloat = 24
1919 static let nicknameLabelTopSpacing : CGFloat = 12
2020 static let divideLineHeight : CGFloat = 6
@@ -41,27 +41,12 @@ final class MypageView: BaseViewController<MypageViewModel> {
4141
4242 override func viewWillAppear( _ animated: Bool ) {
4343 super. viewWillAppear ( animated)
44-
45- navigationController? . setNavigationBarHidden ( false , animated: animated)
46-
47- let appearance = UINavigationBarAppearance ( )
48- appearance. configureWithOpaqueBackground ( )
49- appearance. backgroundColor = . white
50- appearance. shadowColor = . clear
51-
52- navigationController? . navigationBar. standardAppearance = appearance
53- navigationController? . navigationBar. scrollEdgeAppearance = appearance
54- navigationController? . navigationBar. compactAppearance = appearance
44+ navigationController? . navigationBar. isHidden = true
5545 }
5646
5747 override func configureAttribute( ) {
5848 view. backgroundColor = . white
59- navigationItem. rightBarButtonItem = settingButton
60- title = " 마이페이지 "
6149
62- settingButton. action = #selector( settingButtonTapped)
63- settingButton. target = self
64- settingButton. image = BitnagilIcon . settingIcon? . withRenderingMode ( . alwaysOriginal)
6550 profileImageView. image = BitnagilGraphic . profileGraphic
6651
6752 nicknameLabel. font = BitnagilFont ( style: . title3, weight: . semiBold) . font
@@ -75,6 +60,21 @@ final class MypageView: BaseViewController<MypageViewModel> {
7560 tableView. delegate = self
7661 tableView. separatorStyle = . none
7762 tableView. bounces = false
63+
64+ let settingButtonImage = BitnagilIcon . settingIcon
65+ let settingButtonAction = UIAction { [ weak self] _ in
66+ guard let settingViewModel = Shared . DIContainer. shared. resolve ( type: SettingViewModel . self) else { return }
67+ let settingView = SettingView ( viewModel: settingViewModel)
68+ self ? . navigationController? . pushViewController ( settingView, animated: true )
69+ }
70+
71+ configureCustomNavigationBar ( navigationBarStyle:
72+ . withRightButton(
73+ title: " 마이페이지 " ,
74+ rightButtonImage: settingButtonImage ?? . init( ) ,
75+ rightButtonAction: settingButtonAction,
76+ rightButtonTintColor: BitnagilColor . gray70,
77+ withBackButton: false ) )
7878 }
7979
8080 override func configureLayout( ) {
@@ -125,12 +125,6 @@ final class MypageView: BaseViewController<MypageViewModel> {
125125 }
126126 . store ( in: & cancellables)
127127 }
128-
129- @objc private func settingButtonTapped( ) {
130- guard let settingViewModel = Shared . DIContainer. shared. resolve ( type: SettingViewModel . self) else { return }
131- let settingView = SettingView ( viewModel: settingViewModel)
132- navigationController? . pushViewController ( settingView, animated: true )
133- }
134128}
135129
136130extension MypageView : UITableViewDelegate {
0 commit comments