diff --git a/Drink-EG/Drink-EG/Resources/Assets.xcassets/Profile.jpeg b/Drink-EG/Drink-EG/Resources/Assets.xcassets/Profile.jpeg new file mode 100644 index 0000000..65840eb Binary files /dev/null and b/Drink-EG/Drink-EG/Resources/Assets.xcassets/Profile.jpeg differ diff --git a/Drink-EG/Drink-EG/Resources/Assets.xcassets/ProfileSampleImage/Contents.json b/Drink-EG/Drink-EG/Resources/Assets.xcassets/ProfileSampleImage/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Drink-EG/Drink-EG/Resources/Assets.xcassets/ProfileSampleImage/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Drink-EG/Drink-EG/Resources/Assets.xcassets/ProfileSampleImage/Profile.imageset/Contents.json b/Drink-EG/Drink-EG/Resources/Assets.xcassets/ProfileSampleImage/Profile.imageset/Contents.json new file mode 100644 index 0000000..1570c19 --- /dev/null +++ b/Drink-EG/Drink-EG/Resources/Assets.xcassets/ProfileSampleImage/Profile.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Profile.jpeg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Drink-EG/Drink-EG/Resources/Assets.xcassets/ProfileSampleImage/Profile.imageset/Profile.jpeg b/Drink-EG/Drink-EG/Resources/Assets.xcassets/ProfileSampleImage/Profile.imageset/Profile.jpeg new file mode 100644 index 0000000..65840eb Binary files /dev/null and b/Drink-EG/Drink-EG/Resources/Assets.xcassets/ProfileSampleImage/Profile.imageset/Profile.jpeg differ diff --git a/Drink-EG/Drink-EG/Resources/SceneDelegate.swift b/Drink-EG/Drink-EG/Resources/SceneDelegate.swift index dbe1d33..1763e5e 100644 --- a/Drink-EG/Drink-EG/Resources/SceneDelegate.swift +++ b/Drink-EG/Drink-EG/Resources/SceneDelegate.swift @@ -20,7 +20,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { // 화면을 구성하는 UIWindow 인스턴스 생성 let window = UIWindow(windowScene: windowScene) // 실제 첫 화면이 되는 MainViewController 인스턴스 생성 - let vc = EnterLoginViewController() + let vc = WriteNoteViewController() // NavigationController을 사용할 경우, MainViewController를 rootViewController로 갖는 NavigationController을 생성해야한다. let navigationController = UINavigationController(rootViewController: vc) navigationController.isNavigationBarHidden = true diff --git a/Drink-EG/Drink-EG/Sources/Models/PolygonChartView.swift b/Drink-EG/Drink-EG/Sources/Models/PolygonChartView.swift index a7d6373..d717bab 100644 --- a/Drink-EG/Drink-EG/Sources/Models/PolygonChartView.swift +++ b/Drink-EG/Drink-EG/Sources/Models/PolygonChartView.swift @@ -67,7 +67,7 @@ class PolygonChartView: UIButton { for _ in 0 ..< step { stepLinePaths.append(CustomUIBezierPath()) } - let heightMaxValue = rect.height / 2 * 0.7 // RadarChartView영역내에 모든 그림이 그려지도록 max value가 그려질 높이 + let heightMaxValue = rect.height / 2 * 0.5 // RadarChartView영역내에 모든 그림이 그려지도록 max value가 그려질 높이 let heightStep = heightMaxValue / CGFloat(step) // 1단계에 해당하는 높이 let cx = rect.midX let cy = rect.midY 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..6902986 100644 --- a/Drink-EG/Drink-EG/Sources/VCs/Community/CommunityMainViewController.swift +++ b/Drink-EG/Drink-EG/Sources/VCs/Community/CommunityMainViewController.swift @@ -146,7 +146,7 @@ class CommunityMainViewController : UIViewController, UITableViewDataSource, UIT contentView.snp.makeConstraints { make in make.edges.equalTo(scrollView) make.width.equalTo(scrollView) - make.height.greaterThanOrEqualTo(view.snp.height).offset(500) + make.height.greaterThanOrEqualTo(UIScreen.main.bounds.height).multipliedBy(1.2) } } @@ -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/Settings/MypageInfoBottomViewController.swift b/Drink-EG/Drink-EG/Sources/VCs/Settings/MypageInfoBottomViewController.swift index a6f60b1..490f17d 100644 --- a/Drink-EG/Drink-EG/Sources/VCs/Settings/MypageInfoBottomViewController.swift +++ b/Drink-EG/Drink-EG/Sources/VCs/Settings/MypageInfoBottomViewController.swift @@ -131,10 +131,10 @@ class MypageInfoViewController: UIViewController { let myinfoLabel = UILabel() let mynameLabel = UILabel() let myinfobutton = UIButton(type: .system) - - let imageView = UIImageView() + let imageView = UIImageView() + override func viewDidLoad() { super.viewDidLoad() 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..bbce7ba 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) } } @@ -168,7 +173,7 @@ class RatingViewController: UIViewController { make.width.equalTo(titleSize.width+37) make.height.greaterThanOrEqualTo(33) - if i % 4 == 0 { + if i % 3 == 0 { // 첫 번째 버튼이거나 새로운 줄의 첫 번째 버튼 make.leading.equalTo(tasteView.snp.leading).offset(13) if i == 0 { diff --git a/Drink-EG/Drink-EG/Sources/VCs/WriteNoteViewController.swift b/Drink-EG/Drink-EG/Sources/VCs/WriteNoteViewController.swift index 5c3f830..24fee49 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(25) } }