-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0307f15
commit c8b9429
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// FeedDetailViewController.swift | ||
// PLUV | ||
// | ||
// Created by 백유정 on 8/31/24. | ||
// | ||
|
||
import UIKit | ||
|
||
class FeedDetailViewController: UIViewController { | ||
|
||
init(viewModel: FeedViewModel) { | ||
super.init(nibName: nil, bundle: nil) | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
setUI() | ||
setNavigationBar() | ||
} | ||
|
||
private func setUI() { | ||
self.view.backgroundColor = .white | ||
self.navigationItem.setHidesBackButton(true, animated: false) | ||
} | ||
|
||
private func setNavigationBar() { | ||
/// NavigationBar의 back 버튼 이미지 변경 | ||
let backImage = UIImage(named: "backbutton_icon")?.withRenderingMode(.alwaysOriginal) | ||
let resizedBackImage = backImage?.withRenderingMode(.alwaysOriginal).resize(to: CGSize(width: 24, height: 24)) | ||
let backButton = UIBarButtonItem(image: resizedBackImage, style: .plain, target: self, action: #selector(clickBackButton)) | ||
backButton.tintColor = .gray800 | ||
navigationItem.leftBarButtonItem = backButton | ||
} | ||
|
||
@objc private func clickBackButton() { | ||
self.navigationController?.popViewController(animated: true) | ||
} | ||
} |