From d6f1b0802abc91ce848b96f922c8b79729a17b9d Mon Sep 17 00:00:00 2001 From: dev-madilyn Date: Fri, 5 Aug 2022 23:07:42 +0900 Subject: [PATCH 01/10] =?UTF-8?q?=E2=9C=85=C2=A0Chore:=20HomeVC=EB=A5=BC?= =?UTF-8?q?=20=EA=B5=AC=EC=84=B1=ED=95=A0=20TableView=20=EC=83=9D=EC=84=B1?= =?UTF-8?q?=20(#415)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Screen/Home/VC/HomeVC.swift | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift index 3c06618f..90ca6985 100644 --- a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift +++ b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift @@ -10,16 +10,30 @@ import SnapKit import Then class HomeVC: BaseVC { - + // MARK: Components - private var tabLabel = UILabel().then { - $0.text = "홈" + private var backgroundTV = UITableView().then { + $0.separatorStyle = .none + $0.backgroundColor = .white } // MARK: Life Cycle override func viewDidLoad() { super.viewDidLoad() configureUI() + setBackgroundTV() + } + + private func setBackgroundTV() { + backgroundTV.dataSource = self + backgroundTV.delegate = self + + backgroundTV.sectionHeaderTopPadding = 0 + + backgroundTV.register(HomeBannerHeaderCell.self, forCellReuseIdentifier: HomeBannerHeaderCell.className) + backgroundTV.register(HomeTitleHeaderCell.self, forCellReuseIdentifier: HomeTitleHeaderCell.className) + backgroundTV.register(HomeFooterCell.self, forCellReuseIdentifier: HomeFooterCell.className) + } } } From 70182dfd09e9083b8dcc6dffa737399796e227b7 Mon Sep 17 00:00:00 2001 From: dev-madilyn Date: Fri, 5 Aug 2022 23:08:49 +0900 Subject: [PATCH 02/10] =?UTF-8?q?=E2=9C=85=C2=A0Chore:=20HomeVC=EB=A5=BC?= =?UTF-8?q?=20=EA=B5=AC=EC=84=B1=ED=95=98=EB=8A=94=20TableView=EC=9D=98=20?= =?UTF-8?q?section=20enum=20type=20=EC=83=9D=EC=84=B1=20(#415)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift index 90ca6985..842a1196 100644 --- a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift +++ b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift @@ -16,7 +16,12 @@ class HomeVC: BaseVC { $0.separatorStyle = .none $0.backgroundColor = .white } - + + // MARK: - Properties + enum HomeBackgroundTVSectionType: Int { + case banner = 0, review, questionPerson, community + } + // MARK: Life Cycle override func viewDidLoad() { super.viewDidLoad() From 73deebaa61eecd53549d1dad8c9357b8b9fd861c Mon Sep 17 00:00:00 2001 From: dev-madilyn Date: Fri, 5 Aug 2022 23:09:17 +0900 Subject: [PATCH 03/10] =?UTF-8?q?=E2=9C=85=C2=A0Chore:=20HomeVC=20UI=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=88=98=EC=A0=95=20(#415)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift index 842a1196..e67ffbfe 100644 --- a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift +++ b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift @@ -45,11 +45,12 @@ class HomeVC: BaseVC { // MARK: - UI extension HomeVC { private func configureUI() { + navigationController?.navigationBar.isHidden = true view.backgroundColor = .white - view.addSubviews([tabLabel]) + view.addSubviews([backgroundTV]) - tabLabel.snp.makeConstraints { - $0.centerX.centerY.equalToSuperview() + backgroundTV.snp.makeConstraints { + $0.horizontalEdges.verticalEdges.equalTo(view.safeAreaLayoutGuide) } } } From 11d666ee50b008e036d6e20626cbc68b9b0eabd3 Mon Sep 17 00:00:00 2001 From: dev-madilyn Date: Fri, 5 Aug 2022 23:10:14 +0900 Subject: [PATCH 04/10] =?UTF-8?q?=E2=9E=95=C2=A0Add:=20=ED=99=88=20?= =?UTF-8?q?=EB=B0=B0=EB=84=88=20=EC=84=B9=EC=85=98=EC=9D=98=20=ED=97=A4?= =?UTF-8?q?=EB=8D=94=20=EC=85=80=20=ED=81=B4=EB=9E=98=EC=8A=A4=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20(#415)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Header/HomeBannerHeaderCell.swift | 55 +++++++++++++++++++ .../NadoSunbae.xcodeproj/project.pbxproj | 13 +++++ 2 files changed, 68 insertions(+) create mode 100644 NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Header/HomeBannerHeaderCell.swift diff --git a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Header/HomeBannerHeaderCell.swift b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Header/HomeBannerHeaderCell.swift new file mode 100644 index 00000000..accf5744 --- /dev/null +++ b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Header/HomeBannerHeaderCell.swift @@ -0,0 +1,55 @@ +// +// HomeBannerHeaderCell.swift +// NadoSunbae +// +// Created by madilyn on 2022/08/05. +// + +import UIKit + +class HomeBannerHeaderCell: UITableViewCell { + + // MARK: Components + private let logoImgView = UIImageView().then { + $0.image = UIImage(named: "logoLogin") + $0.contentMode = .scaleAspectFill + } + private let univLabel = UILabel().then { + $0.textAlignment = .right + $0.font = .PretendardM(size: 14) + $0.textColor = .gray4 + $0.text = "고려대학교" + } + + // MARK: - Initialization + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + configureUI() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} + +// MARK: - UI +extension HomeBannerHeaderCell { + private func configureUI() { + tintColor = .white + backgroundColor = .white + + addSubviews([logoImgView, univLabel]) + + logoImgView.snp.makeConstraints { + $0.left.equalToSuperview().inset(20) + $0.centerY.equalToSuperview() + $0.width.equalTo(82.adjusted) + $0.height.equalTo(28.adjusted) + } + + univLabel.snp.makeConstraints { + $0.right.equalToSuperview().inset(20) + $0.centerY.equalToSuperview() + } + } +} diff --git a/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj b/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj index 075b4b11..ba6262d8 100644 --- a/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj +++ b/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj @@ -297,6 +297,7 @@ C7C4144B27C9392F00296C30 /* MypageSettingService.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7C4144A27C9392F00296C30 /* MypageSettingService.swift */; }; C7C4144E27C939EE00296C30 /* EditProfileRequestModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7C4144D27C939ED00296C30 /* EditProfileRequestModel.swift */; }; C7C4145027C93C4700296C30 /* EditProfileResponseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7C4144F27C93C4700296C30 /* EditProfileResponseModel.swift */; }; + C7E46C06289D0FFE00FBB8C4 /* HomeBannerHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7E46C05289D0FFE00FBB8C4 /* HomeBannerHeaderCell.swift */; }; C7F3F6D927D3858600E12888 /* AppLinkResponseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7F3F6D827D3858600E12888 /* AppLinkResponseModel.swift */; }; C7F3F6DB27D3E38000E12888 /* WithDrawResponseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7F3F6DA27D3E38000E12888 /* WithDrawResponseModel.swift */; }; C7F3F6DD27D5192D00E12888 /* ResendSignUpMailResponseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7F3F6DC27D5192D00E12888 /* ResendSignUpMailResponseModel.swift */; }; @@ -589,6 +590,7 @@ C7C4144A27C9392F00296C30 /* MypageSettingService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MypageSettingService.swift; sourceTree = ""; }; C7C4144D27C939ED00296C30 /* EditProfileRequestModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditProfileRequestModel.swift; sourceTree = ""; }; C7C4144F27C93C4700296C30 /* EditProfileResponseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditProfileResponseModel.swift; sourceTree = ""; }; + C7E46C05289D0FFE00FBB8C4 /* HomeBannerHeaderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeBannerHeaderCell.swift; sourceTree = ""; }; C7F3F6D827D3858600E12888 /* AppLinkResponseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppLinkResponseModel.swift; sourceTree = ""; }; C7F3F6DA27D3E38000E12888 /* WithDrawResponseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WithDrawResponseModel.swift; sourceTree = ""; }; C7F3F6DC27D5192D00E12888 /* ResendSignUpMailResponseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ResendSignUpMailResponseModel.swift; sourceTree = ""; }; @@ -1219,6 +1221,7 @@ 33D44560287C27D700D94495 /* Home */ = { isa = PBXGroup; children = ( + C7E46C04289D0FCC00FBB8C4 /* Header */, 33D44562287C27E500D94495 /* VC */, ); path = Home; @@ -1829,6 +1832,15 @@ path = MypageSetting; sourceTree = ""; }; + C7E46C04289D0FCC00FBB8C4 /* Header */ = { + isa = PBXGroup; + children = ( + C7E46C05289D0FFE00FBB8C4 /* HomeBannerHeaderCell.swift */, + C790A26C289D551400A67135 /* HomeTitleHeaderCell.swift */, + ); + path = Header; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -2042,6 +2054,7 @@ 5C9A93F927A64FB20097310B /* SignUpDataModel.swift in Sources */, 5C87EC22279A2D2C0039D935 /* CreateClassroomPostModel.swift in Sources */, 331364682785AE6500E0C118 /* UIColor+.swift in Sources */, + C7E46C06289D0FFE00FBB8C4 /* HomeBannerHeaderCell.swift in Sources */, 331364582785A96700E0C118 /* UIViewController+.swift in Sources */, 5CC0BFDB27987F6400B96905 /* NotificationNVC.swift in Sources */, 33A666A327BB8F3100779351 /* PostLikeResModel.swift in Sources */, From b4a5a060c6a8ee78238b5e3ff51edb0f0019ac86 Mon Sep 17 00:00:00 2001 From: dev-madilyn Date: Fri, 5 Aug 2022 23:10:41 +0900 Subject: [PATCH 05/10] =?UTF-8?q?=E2=9E=95=C2=A0Add:=20=ED=99=88=20?= =?UTF-8?q?=ED=83=80=EC=9D=B4=ED=8B=80=20=ED=97=A4=EB=8D=94=20=EC=85=80=20?= =?UTF-8?q?=ED=81=B4=EB=9E=98=EC=8A=A4=20=EC=83=9D=EC=84=B1=20(#415)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Header/HomeTitleHeaderCell.swift | 47 +++++++++++++++++++ .../NadoSunbae.xcodeproj/project.pbxproj | 3 ++ 2 files changed, 50 insertions(+) create mode 100644 NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Header/HomeTitleHeaderCell.swift diff --git a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Header/HomeTitleHeaderCell.swift b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Header/HomeTitleHeaderCell.swift new file mode 100644 index 00000000..b45199d4 --- /dev/null +++ b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Header/HomeTitleHeaderCell.swift @@ -0,0 +1,47 @@ +// +// HomeTitleHeaderCell.swift +// NadoSunbae +// +// Created by madilyn on 2022/08/05. +// + +import UIKit + +class HomeTitleHeaderCell: UITableViewCell { + + // MARK: Components + private let titleLabel = UILabel().then { + $0.font = .PretendardB(size: 18) + $0.textColor = .mainBlack + } + + // MARK: - Initialization + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + configureUI() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setTitleLabel(titleText: String) { + titleLabel.text = titleText + titleLabel.sizeToFit() + } +} + +// MARK: - UI +extension HomeTitleHeaderCell { + private func configureUI() { + tintColor = .white + backgroundColor = .white + + addSubviews([titleLabel]) + + titleLabel.snp.makeConstraints { + $0.top.equalToSuperview().inset(40) + $0.left.equalToSuperview().inset(24) + } + } +} diff --git a/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj b/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj index ba6262d8..af473b1c 100644 --- a/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj +++ b/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj @@ -284,6 +284,7 @@ C740A85B27C7C58500C4518A /* EditProfileVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C740A85A27C7C58500C4518A /* EditProfileVC.swift */; }; C75926AB27D7A8B5006ECD9E /* UserToken.swift in Sources */ = {isa = PBXBuildFile; fileRef = C75926AA27D7A8B5006ECD9E /* UserToken.swift */; }; C75926AD27D7CB72006ECD9E /* AppVersion.swift in Sources */ = {isa = PBXBuildFile; fileRef = C75926AC27D7CB72006ECD9E /* AppVersion.swift */; }; + C790A26D289D551400A67135 /* HomeTitleHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C790A26C289D551400A67135 /* HomeTitleHeaderCell.swift */; }; C7ACE62D27CB71EA0011B23F /* SettingVC.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C7ACE62C27CB71EA0011B23F /* SettingVC.storyboard */; }; C7ACE62F27CB71FA0011B23F /* SettingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7ACE62E27CB71FA0011B23F /* SettingVC.swift */; }; C7ACE63227CB73F80011B23F /* SettingTVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7ACE63127CB73F80011B23F /* SettingTVC.swift */; }; @@ -577,6 +578,7 @@ C740A85A27C7C58500C4518A /* EditProfileVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditProfileVC.swift; sourceTree = ""; }; C75926AA27D7A8B5006ECD9E /* UserToken.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserToken.swift; sourceTree = ""; }; C75926AC27D7CB72006ECD9E /* AppVersion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppVersion.swift; sourceTree = ""; }; + C790A26C289D551400A67135 /* HomeTitleHeaderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeTitleHeaderCell.swift; sourceTree = ""; }; C7ACE62C27CB71EA0011B23F /* SettingVC.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = SettingVC.storyboard; sourceTree = ""; }; C7ACE62E27CB71FA0011B23F /* SettingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingVC.swift; sourceTree = ""; }; C7ACE63127CB73F80011B23F /* SettingTVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingTVC.swift; sourceTree = ""; }; @@ -2019,6 +2021,7 @@ 331364642785ADFE00E0C118 /* BaseVC.swift in Sources */, 5CA7E410278BC18D00D748E0 /* SelectMajorModalVC.swift in Sources */, 7754A32627954B770093C230 /* ReviewDetailPostTVC.swift in Sources */, + C790A26D289D551400A67135 /* HomeTitleHeaderCell.swift in Sources */, 5C485F242789661F00FCA5DF /* NadoTextField.swift in Sources */, 3313646C2785AEE000E0C118 /* String+.swift in Sources */, 331C5382279629620052B309 /* BaseQuestionTVC.swift in Sources */, From 53d99f92f4613fb498635bac6feb0b29cfff9728 Mon Sep 17 00:00:00 2001 From: dev-madilyn Date: Fri, 5 Aug 2022 23:11:08 +0900 Subject: [PATCH 06/10] =?UTF-8?q?=E2=9E=95=C2=A0Add:=20=ED=99=88=20?= =?UTF-8?q?=ED=91=B8=ED=84=B0=20=EC=85=80=20=ED=81=B4=EB=9E=98=EC=8A=A4=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20(#415)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Screen/Home/Footer/HomeFooterCell.swift | 29 +++++++++++++++++++ .../NadoSunbae.xcodeproj/project.pbxproj | 12 ++++++++ 2 files changed, 41 insertions(+) create mode 100644 NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Footer/HomeFooterCell.swift diff --git a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Footer/HomeFooterCell.swift b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Footer/HomeFooterCell.swift new file mode 100644 index 00000000..05a1a825 --- /dev/null +++ b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/Footer/HomeFooterCell.swift @@ -0,0 +1,29 @@ +// +// HomeFooterCell.swift +// NadoSunbae +// +// Created by madilyn on 2022/08/05. +// + +import UIKit + +class HomeFooterCell: UITableViewCell { + + // MARK: - Initialization + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + configureUI() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } +} + +// MARK: - UI +extension HomeFooterCell { + private func configureUI() { + tintColor = .clear + backgroundColor = .gray0 + } +} diff --git a/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj b/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj index af473b1c..7d725a31 100644 --- a/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj +++ b/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj @@ -285,6 +285,7 @@ C75926AB27D7A8B5006ECD9E /* UserToken.swift in Sources */ = {isa = PBXBuildFile; fileRef = C75926AA27D7A8B5006ECD9E /* UserToken.swift */; }; C75926AD27D7CB72006ECD9E /* AppVersion.swift in Sources */ = {isa = PBXBuildFile; fileRef = C75926AC27D7CB72006ECD9E /* AppVersion.swift */; }; C790A26D289D551400A67135 /* HomeTitleHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C790A26C289D551400A67135 /* HomeTitleHeaderCell.swift */; }; + C790A270289D57C900A67135 /* HomeFooterCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C790A26F289D57C900A67135 /* HomeFooterCell.swift */; }; C7ACE62D27CB71EA0011B23F /* SettingVC.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C7ACE62C27CB71EA0011B23F /* SettingVC.storyboard */; }; C7ACE62F27CB71FA0011B23F /* SettingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7ACE62E27CB71FA0011B23F /* SettingVC.swift */; }; C7ACE63227CB73F80011B23F /* SettingTVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7ACE63127CB73F80011B23F /* SettingTVC.swift */; }; @@ -579,6 +580,7 @@ C75926AA27D7A8B5006ECD9E /* UserToken.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserToken.swift; sourceTree = ""; }; C75926AC27D7CB72006ECD9E /* AppVersion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppVersion.swift; sourceTree = ""; }; C790A26C289D551400A67135 /* HomeTitleHeaderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeTitleHeaderCell.swift; sourceTree = ""; }; + C790A26F289D57C900A67135 /* HomeFooterCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeFooterCell.swift; sourceTree = ""; }; C7ACE62C27CB71EA0011B23F /* SettingVC.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = SettingVC.storyboard; sourceTree = ""; }; C7ACE62E27CB71FA0011B23F /* SettingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingVC.swift; sourceTree = ""; }; C7ACE63127CB73F80011B23F /* SettingTVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingTVC.swift; sourceTree = ""; }; @@ -1223,6 +1225,7 @@ 33D44560287C27D700D94495 /* Home */ = { isa = PBXGroup; children = ( + C790A26E289D57BA00A67135 /* Footer */, C7E46C04289D0FCC00FBB8C4 /* Header */, 33D44562287C27E500D94495 /* VC */, ); @@ -1777,6 +1780,14 @@ path = SB; sourceTree = ""; }; + C790A26E289D57BA00A67135 /* Footer */ = { + isa = PBXGroup; + children = ( + C790A26F289D57C900A67135 /* HomeFooterCell.swift */, + ); + path = Footer; + sourceTree = ""; + }; C7ACE62927CA9EC70011B23F /* Setting */ = { isa = PBXGroup; children = ( @@ -2153,6 +2164,7 @@ 331364702785B18100E0C118 /* UserDefaults+.swift in Sources */, 33C50100281A4E24004AAEEE /* Navigator.swift in Sources */, 33CF634F27945C0400E92C04 /* NadoSegmentView.swift in Sources */, + C790A270289D57C900A67135 /* HomeFooterCell.swift in Sources */, 33BE2D6A2789D605000FB6C8 /* NadoSunbaeBtn.swift in Sources */, C7ACE63627CBD3280011B23F /* SettingAppInfoVC.swift in Sources */, 5C32801A2797284800781EBE /* MypageUserInfoModel.swift in Sources */, From 151521129e69cec474f6afa6d37acef731e36be0 Mon Sep 17 00:00:00 2001 From: dev-madilyn Date: Fri, 5 Aug 2022 23:13:59 +0900 Subject: [PATCH 07/10] =?UTF-8?q?=E2=9C=85=C2=A0Chore:=20=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=B8=94=EB=B7=B0=20=EC=85=80=20=EA=B0=9C=EC=88=98=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20(#415)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Screen/Home/VC/HomeVC.swift | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift index e67ffbfe..2c657a1d 100644 --- a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift +++ b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift @@ -39,6 +39,46 @@ class HomeVC: BaseVC { backgroundTV.register(HomeTitleHeaderCell.self, forCellReuseIdentifier: HomeTitleHeaderCell.className) backgroundTV.register(HomeFooterCell.self, forCellReuseIdentifier: HomeFooterCell.className) } +} + +// MARK: - UITableViewDataSource +extension HomeVC: UITableViewDataSource { + func numberOfSections(in tableView: UITableView) -> Int { + return 4 + } + + // MARK: Cell + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + if let tableSection = HomeBackgroundTVSectionType(rawValue: section) { + switch tableSection { + case .banner: + return 1 + case .review: + return 2 + case .questionPerson: + return 4 + case .community: + return 2 + } + } else { return 0 } + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + if let tableSection = HomeBackgroundTVSectionType(rawValue: indexPath.section) { + switch tableSection { + case .banner: + return UITableViewCell() + case .review: + return UITableViewCell() + case .questionPerson: + return UITableViewCell() + case .community: + return UITableViewCell() + } + } else { return UITableViewCell() } + } +} + } } From 2818a9f414c907532984f0f5dee2eab474953940 Mon Sep 17 00:00:00 2001 From: dev-madilyn Date: Fri, 5 Aug 2022 23:14:28 +0900 Subject: [PATCH 08/10] =?UTF-8?q?=E2=9C=85=C2=A0Chore:=20=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=B8=94=EB=B7=B0=20=ED=97=A4=EB=8D=94=20=EC=85=80=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EB=B0=8F=20=EB=86=92=EC=9D=B4=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20(#415)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Screen/Home/VC/HomeVC.swift | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift index 2c657a1d..350c879d 100644 --- a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift +++ b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift @@ -79,6 +79,46 @@ extension HomeVC: UITableViewDataSource { } } +// MARK: - UITableViewDelegate +extension HomeVC: UITableViewDelegate { + + // MARK: Header + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { + if let tableSection = HomeBackgroundTVSectionType(rawValue: section) { + switch tableSection { + case .banner: + guard let headerView = tableView.dequeueReusableCell(withIdentifier: HomeBannerHeaderCell.className) as? HomeBannerHeaderCell else { return HomeBannerHeaderCell() } + return headerView + case .review: + guard let headerView = tableView.dequeueReusableCell(withIdentifier: HomeTitleHeaderCell.className) as? HomeTitleHeaderCell else { return HomeTitleHeaderCell() } + headerView.setTitleLabel(titleText: "후기") + return headerView + case .questionPerson: + guard let headerView = tableView.dequeueReusableCell(withIdentifier: HomeTitleHeaderCell.className) as? HomeTitleHeaderCell else { return HomeTitleHeaderCell() } + headerView.setTitleLabel(titleText: "1:1질문") + return headerView + case .community: + guard let headerView = tableView.dequeueReusableCell(withIdentifier: HomeTitleHeaderCell.className) as? HomeTitleHeaderCell else { return HomeTitleHeaderCell() } + headerView.setTitleLabel(titleText: "커뮤니티") + return headerView + } + } else { return UIView() } + } + + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { + if let tableSection = HomeBackgroundTVSectionType(rawValue: section) { + switch tableSection { + case .banner: + let headerHeight = 60.0 + tableView.tableHeaderView = UIView(frame: CGRect(x: 0, y: 0, width: tableView.bounds.size.width, height: headerHeight)) + tableView.contentInset = UIEdgeInsets(top: -headerHeight, left: 0, bottom: 0, right: 0) + return headerHeight + case .review, .questionPerson, .community: + return 70 + } + } else { return 0 } + } + } } From 93d34ed9a62abcb90b16de9cc01052d31a5a378e Mon Sep 17 00:00:00 2001 From: dev-madilyn Date: Fri, 5 Aug 2022 23:14:39 +0900 Subject: [PATCH 09/10] =?UTF-8?q?=E2=9C=85=C2=A0Chore:=20=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=B8=94=EB=B7=B0=20=ED=91=B8=ED=84=B0=20=EC=85=80=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EB=B0=8F=20=EB=86=92=EC=9D=B4=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20(#415)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Screen/Home/VC/HomeVC.swift | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift index 350c879d..42c3099c 100644 --- a/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift +++ b/NadoSunbae-iOS/NadoSunbae-iOS/Screen/Home/VC/HomeVC.swift @@ -119,6 +119,28 @@ extension HomeVC: UITableViewDelegate { } else { return 0 } } + // MARK: Footer + func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { + if let tableSection = HomeBackgroundTVSectionType(rawValue: section) { + switch tableSection { + case .review, .questionPerson: + guard let footerView = tableView.dequeueReusableCell(withIdentifier: HomeFooterCell.className) as? HomeFooterCell else { return HomeFooterCell() } + return footerView + default: + return nil + } + } else { return nil } + } + + func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { + if let tableSection = HomeBackgroundTVSectionType(rawValue: section) { + switch tableSection { + case .review, .questionPerson: + return 12 + default: + return 0 + } + } else { return 0 } } } From e0142d0510f1784917b2fa29d15b7582d7fba881 Mon Sep 17 00:00:00 2001 From: dev-madilyn Date: Fri, 5 Aug 2022 23:15:35 +0900 Subject: [PATCH 10/10] =?UTF-8?q?=E2=9A=B0=EF=B8=8F=C2=A0Remove:=20Pod=20?= =?UTF-8?q?=EA=B7=B8=EB=A3=B9=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj | 8 -------- 1 file changed, 8 deletions(-) diff --git a/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj b/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj index 7d725a31..f55ea2cd 100644 --- a/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj +++ b/NadoSunbae-iOS/NadoSunbae.xcodeproj/project.pbxproj @@ -620,19 +620,11 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 306F49A055DE8364038C4FEE /* Pods */ = { - isa = PBXGroup; - children = ( - ); - path = Pods; - sourceTree = ""; - }; 3313641D2784D3BD00E0C118 = { isa = PBXGroup; children = ( 331364282784D3BD00E0C118 /* NadoSunbae-iOS */, 331364272784D3BD00E0C118 /* Products */, - 306F49A055DE8364038C4FEE /* Pods */, 5C32801D2797333B00781EBE /* Recovered References */, ); sourceTree = "";