diff --git a/Drink-EG/Drink-EG/Sources/VCs/AddNewNoteViewController.swift b/Drink-EG/Drink-EG/Sources/VCs/AddNewNoteViewController.swift index b6edb3b..f620be9 100644 --- a/Drink-EG/Drink-EG/Sources/VCs/AddNewNoteViewController.swift +++ b/Drink-EG/Drink-EG/Sources/VCs/AddNewNoteViewController.swift @@ -45,6 +45,11 @@ class AddNewNoteViewController: UIViewController, UITableViewDataSource, UITable return s }() + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + self.navigationController?.setNavigationBarHidden(false, animated: animated) + } + override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .white @@ -64,7 +69,7 @@ class AddNewNoteViewController: UIViewController, UITableViewDataSource, UITable } func setupNavigationBarButton() { - navigationItem.hidesBackButton = true + navigationItem.hidesBackButton = false let backArrow = UIImage(systemName: "chevron.backward") let leftButton = UIBarButtonItem(image: backArrow, style: .plain, target: self, action: #selector(backButtonTapped)) navigationItem.leftBarButtonItem = leftButton @@ -77,26 +82,24 @@ class AddNewNoteViewController: UIViewController, UITableViewDataSource, UITable func setupLabel() { // Label의 기본 속성을 설정하는 함수 tastingnoteLabel.text = "테이스팅 노트" - tastingnoteLabel.font = UIFont(name: "Pretendard-Bold", size: 28) + tastingnoteLabel.font = .systemFont(ofSize: UIConstants.labelFontSize, weight: UIFont.Weight(rawValue: 700)) tastingnoteLabel.textAlignment = .center tastingnoteLabel.textColor = .black } func setuptastingnoteLabelConstraints() { // Label의 제약 조건을 설정하는 함수 tastingnoteLabel.snp.makeConstraints{ make in - make.top.equalTo(view.safeAreaLayoutGuide.snp.top).offset(46) - make.leading.equalTo(view.safeAreaLayoutGuide.snp.leading).offset(16) + make.top.equalTo(view.safeAreaLayoutGuide.snp.top).offset(20) + make.leading.equalTo(view.safeAreaLayoutGuide.snp.leading).offset(27) } } func setupWineSearchBarConstraints() { wineSearchBar.snp.makeConstraints { make in - make.top.equalTo(tastingnoteLabel.snp.bottom).offset(46) - make.leading.equalTo(tastingnoteLabel.snp.leading) - make.centerX.equalTo(view.safeAreaLayoutGuide.snp.centerX) - make.height.equalTo(34) + make.top.equalTo(tastingnoteLabel.snp.bottom).offset(10) + make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(16) + make.height.equalTo(UIConstants.searchBarHeight) } - } func setupSuggestionTableView() { diff --git a/Drink-EG/Drink-EG/Sources/VCs/ChooseTasteViewController.swift b/Drink-EG/Drink-EG/Sources/VCs/ChooseTasteViewController.swift index ecb4cfb..46ab31e 100644 --- a/Drink-EG/Drink-EG/Sources/VCs/ChooseTasteViewController.swift +++ b/Drink-EG/Drink-EG/Sources/VCs/ChooseTasteViewController.swift @@ -40,6 +40,11 @@ class ChooseTasteViewController: UIViewController, UICollectionViewDelegate, UIC var tasteCollectionView: UICollectionView! var finishCollectionView: UICollectionView! + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + self.navigationController?.setNavigationBarHidden(false, animated: animated) + } + override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .white @@ -211,7 +216,7 @@ class ChooseTasteViewController: UIViewController, UICollectionViewDelegate, UIC } func setupNavigationBarButton() { - navigationItem.hidesBackButton = true + navigationItem.hidesBackButton = false let backArrow = UIImage(systemName: "chevron.backward") let leftButton = UIBarButtonItem(image: backArrow, style: .plain, target: self, action: #selector(backButtonTapped)) navigationItem.leftBarButtonItem = leftButton @@ -243,15 +248,15 @@ class ChooseTasteViewController: UIViewController, UICollectionViewDelegate, UIC func setupLabel() { // Label의 기본 속성을 설정하는 함수 contentView.addSubview(tastingnoteLabel) tastingnoteLabel.text = "테이스팅 노트" - tastingnoteLabel.font = UIFont(name: "Pretendard-Bold", size: 28) + tastingnoteLabel.font = .systemFont(ofSize: UIConstants.labelFontSize, weight: UIFont.Weight(rawValue: 700)) tastingnoteLabel.textAlignment = .center tastingnoteLabel.textColor = .black } func setuptastingnoteLabelConstraints() { // Label의 제약 조건을 설정하는 함수 tastingnoteLabel.snp.makeConstraints{ make in - make.top.equalTo(contentView.snp.top).offset(46) - make.leading.equalTo(contentView.snp.leading).offset(16) + make.top.equalTo(contentView.snp.top).offset(20) + make.leading.equalTo(contentView.snp.leading).offset(27) } } diff --git a/Drink-EG/Drink-EG/Sources/VCs/Community/CommunityMainViewController.swift b/Drink-EG/Drink-EG/Sources/VCs/Community/CommunityMainViewController.swift index e1462e8..eab7b1b 100644 --- a/Drink-EG/Drink-EG/Sources/VCs/Community/CommunityMainViewController.swift +++ b/Drink-EG/Drink-EG/Sources/VCs/Community/CommunityMainViewController.swift @@ -182,7 +182,7 @@ class CommunityMainViewController : UIViewController, UITableViewDataSource, UIT make.top.equalTo(communityLabel.snp.bottom).offset(46) make.leading.equalTo(communityLabel.snp.leading) make.centerX.equalTo(contentView.snp.centerX) - make.height.equalTo(34) + make.height.equalTo(UIConstants.searchBarHeight) } } diff --git a/Drink-EG/Drink-EG/Sources/VCs/NoteInfoViewController.swift b/Drink-EG/Drink-EG/Sources/VCs/NoteInfoViewController.swift index b601e80..85c538b 100644 --- a/Drink-EG/Drink-EG/Sources/VCs/NoteInfoViewController.swift +++ b/Drink-EG/Drink-EG/Sources/VCs/NoteInfoViewController.swift @@ -29,6 +29,10 @@ class NoteInfoViewController: UIViewController { var selectedWineArea: String? var selectedWineSort: String? + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + self.navigationController?.setNavigationBarHidden(false, animated: animated) + } override func viewDidLoad() { super.viewDidLoad() @@ -70,7 +74,7 @@ class NoteInfoViewController: UIViewController { } func setupNavigationBarButton() { - navigationItem.hidesBackButton = true + navigationItem.hidesBackButton = false let backArrow = UIImage(systemName: "chevron.backward") let leftButton = UIBarButtonItem(image: backArrow, style: .plain, target: self, action: #selector(backButtonTapped)) navigationItem.leftBarButtonItem = leftButton @@ -85,15 +89,15 @@ class NoteInfoViewController: UIViewController { func setupLabel() { // Label의 기본 속성을 설정하는 함수 contentView.addSubview(tastingnoteLabel) tastingnoteLabel.text = "테이스팅 노트" - tastingnoteLabel.font = UIFont(name: "Pretendard-Bold", size: 28) + tastingnoteLabel.font = .systemFont(ofSize: UIConstants.labelFontSize, weight: UIFont.Weight(rawValue: 700)) tastingnoteLabel.textAlignment = .center tastingnoteLabel.textColor = .black } func setuptastingnoteLabelConstraints() { // Label의 제약 조건을 설정하는 함수 tastingnoteLabel.snp.makeConstraints{ make in - make.top.equalTo(contentView.safeAreaLayoutGuide.snp.top).offset(46) - make.leading.equalTo(contentView.safeAreaLayoutGuide.snp.leading).offset(16) + make.top.equalTo(contentView.safeAreaLayoutGuide.snp.top).offset(20) + make.leading.equalTo(contentView.safeAreaLayoutGuide.snp.leading).offset(27) } } diff --git a/Drink-EG/Drink-EG/Sources/VCs/NoteListViewController.swift b/Drink-EG/Drink-EG/Sources/VCs/NoteListViewController.swift index 1b1d761..9a627ce 100644 --- a/Drink-EG/Drink-EG/Sources/VCs/NoteListViewController.swift +++ b/Drink-EG/Drink-EG/Sources/VCs/NoteListViewController.swift @@ -66,7 +66,7 @@ class NoteListViewController: UIViewController, UICollectionViewDelegate, UIColl override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - self.navigationController?.setNavigationBarHidden(true, animated: animated) + self.navigationController?.setNavigationBarHidden(false, animated: animated) setupAPI() } @@ -87,8 +87,8 @@ class NoteListViewController: UIViewController, UICollectionViewDelegate, UIColl } func setupNavigationBarButton() { - navigationItem.hidesBackButton = true - let backArrow = UIImage(systemName: "chevron.backward") + navigationItem.hidesBackButton = false + let backArrow = UIImage(systemName: "") let leftButton = UIBarButtonItem(image: backArrow, style: .plain, target: self, action: #selector(backButtonTapped)) navigationItem.leftBarButtonItem = leftButton leftButton.tintColor = .black @@ -101,15 +101,15 @@ class NoteListViewController: UIViewController, UICollectionViewDelegate, UIColl // MARK: 노트 보관함에 관한 UI func setupLabel() { // Label의 기본 속성을 설정하는 함수 noteListLabel.text = "노트 보관함" - noteListLabel.font = UIFont(name: "Pretendard-Bold", size: 28) + noteListLabel.font = .systemFont(ofSize: UIConstants.labelFontSize, weight: UIFont.Weight(rawValue: 700)) noteListLabel.textAlignment = .center noteListLabel.textColor = .black } func setupNoteListLabelConstraints() { // Label의 제약 조건을 설정하는 함수 noteListLabel.snp.makeConstraints{ make in - make.top.equalTo(view.safeAreaLayoutGuide.snp.top).offset(46) - make.leading.equalTo(view.safeAreaLayoutGuide.snp.leading).offset(16) + make.top.equalTo(view.safeAreaLayoutGuide.snp.top).offset(20) + make.leading.equalTo(view.safeAreaLayoutGuide.snp.leading).offset(27) } } diff --git a/Drink-EG/Drink-EG/Sources/VCs/TastingNote/CheckNoteViewController.swift b/Drink-EG/Drink-EG/Sources/VCs/TastingNote/CheckNoteViewController.swift index 21ace15..33aca1d 100644 --- a/Drink-EG/Drink-EG/Sources/VCs/TastingNote/CheckNoteViewController.swift +++ b/Drink-EG/Drink-EG/Sources/VCs/TastingNote/CheckNoteViewController.swift @@ -50,6 +50,15 @@ class CheckNoteViewController: UIViewController { } } + private let wineInfoLabel: UILabel = { + let w = UILabel() + w.text = "와인 정보" + w.font = .systemFont(ofSize: UIConstants.labelFontSize, weight: UIFont.Weight(rawValue: 700)) + w.textAlignment = .center + w.textColor = .black + return w + }() + private let infoView: UIView = { let v = UIView() v.backgroundColor = UIColor(hex: "FBCBC4") @@ -243,24 +252,50 @@ class CheckNoteViewController: UIViewController { finishButton.layer.cornerRadius = 10 } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + self.navigationController?.setNavigationBarHidden(false, animated: animated) + } + override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .white print(selectedOptions) + setupNavigationBarButton() setupView() setupUI() } + func setupNavigationBarButton() { + navigationItem.hidesBackButton = false + let backArrow = UIImage(systemName: "chevron.backward") + let leftButton = UIBarButtonItem(image: backArrow, style: .plain, target: self, action: #selector(backButtonTapped)) + navigationItem.leftBarButtonItem = leftButton + leftButton.tintColor = .black + } + + @objc func backButtonTapped() { + navigationController?.popViewController(animated: true) + } + private func setupUI() { setupPentagonChart() setupButton() setupReview() + contentView.addSubview(wineInfoLabel) + + wineInfoLabel.snp.makeConstraints { make in + make.top.equalTo(contentView.safeAreaLayoutGuide).offset(20) + make.leading.equalTo(contentView.safeAreaLayoutGuide).offset(27) + } + contentView.addSubview(infoView) infoView.snp.makeConstraints { make in - make.top.equalTo(contentView.safeAreaLayoutGuide).offset(50) - make.leading.trailing.equalTo(contentView.safeAreaLayoutGuide).inset(14) + make.top.equalTo(wineInfoLabel.snp.bottom).offset(30) + make.leading.equalTo(wineInfoLabel.snp.leading) + make.centerX.equalTo(contentView.snp.centerX) make.height.equalTo(UIScreen.main.bounds.height * 0.09) } diff --git a/Drink-EG/Drink-EG/Sources/VCs/TastingNote/RatingViewController.swift b/Drink-EG/Drink-EG/Sources/VCs/TastingNote/RatingViewController.swift index a6d7b89..cfb68a4 100644 --- a/Drink-EG/Drink-EG/Sources/VCs/TastingNote/RatingViewController.swift +++ b/Drink-EG/Drink-EG/Sources/VCs/TastingNote/RatingViewController.swift @@ -39,6 +39,11 @@ class RatingViewController: UIViewController { let provider = MoyaProvider(plugins: [CookiePlugin()]) + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + self.navigationController?.setNavigationBarHidden(false, animated: animated) + } + override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .white @@ -71,7 +76,7 @@ class RatingViewController: UIViewController { } func setupNavigationBarButton() { - navigationItem.hidesBackButton = true + navigationItem.hidesBackButton = false let backArrow = UIImage(systemName: "chevron.backward") let leftButton = UIBarButtonItem(image: backArrow, style: .plain, target: self, action: #selector(backButtonTapped)) navigationItem.leftBarButtonItem = leftButton @@ -101,15 +106,15 @@ class RatingViewController: UIViewController { func setupLabel() { // Label의 기본 속성을 설정하는 함수 contentView.addSubview(tastingnoteLabel) tastingnoteLabel.text = "테이스팅 노트" - tastingnoteLabel.font = UIFont(name: "Pretendard-Bold", size: 28) + tastingnoteLabel.font = .systemFont(ofSize: UIConstants.labelFontSize, weight: UIFont.Weight(rawValue: 700)) tastingnoteLabel.textAlignment = .center tastingnoteLabel.textColor = .black } func setuptastingnoteLabelConstraints() { // Label의 제약 조건을 설정하는 함수 tastingnoteLabel.snp.makeConstraints{ make in - make.top.equalTo(contentView.snp.top).offset(46) - make.leading.equalTo(contentView.snp.leading).offset(16) + make.top.equalTo(contentView.snp.top).offset(20) + make.leading.equalTo(contentView.snp.leading).offset(27) } } diff --git a/Drink-EG/Drink-EG/Sources/VCs/WriteNoteViewController.swift b/Drink-EG/Drink-EG/Sources/VCs/WriteNoteViewController.swift index 5c3f830..7d098a3 100644 --- a/Drink-EG/Drink-EG/Sources/VCs/WriteNoteViewController.swift +++ b/Drink-EG/Drink-EG/Sources/VCs/WriteNoteViewController.swift @@ -25,6 +25,11 @@ class WriteNoteViewController: UIViewController { let contentView = UIView() let nextButton = UIButton() + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + self.navigationController?.setNavigationBarHidden(false, animated: animated) + } + override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .white @@ -63,7 +68,7 @@ class WriteNoteViewController: UIViewController { } func setupNavigationBarButton() { - navigationItem.hidesBackButton = true + navigationItem.hidesBackButton = false let backArrow = UIImage(systemName: "chevron.backward") let leftButton = UIBarButtonItem(image: backArrow, style: .plain, target: self, action: #selector(backButtonTapped)) navigationItem.leftBarButtonItem = leftButton @@ -77,15 +82,15 @@ class WriteNoteViewController: UIViewController { func setupLabel() { // Label의 기본 속성을 설정하는 함수 contentView.addSubview(tastingnoteLabel) tastingnoteLabel.text = "테이스팅 노트" - tastingnoteLabel.font = UIFont(name: "Pretendard-Bold", size: 28) + tastingnoteLabel.font = .systemFont(ofSize: UIConstants.labelFontSize, weight: UIFont.Weight(rawValue: 700)) tastingnoteLabel.textAlignment = .center tastingnoteLabel.textColor = .black } func setuptastingnoteLabelConstraints() { // Label의 제약 조건을 설정하는 함수 tastingnoteLabel.snp.makeConstraints{ make in - make.top.equalTo(contentView.safeAreaLayoutGuide.snp.top).offset(46) - make.leading.equalTo(contentView.safeAreaLayoutGuide.snp.leading).offset(16) + make.top.equalTo(contentView.safeAreaLayoutGuide.snp.top).offset(20) + make.leading.equalTo(contentView.safeAreaLayoutGuide.snp.leading).offset(27) } }