From 0bbe004d06251b2b28c394b127075def4bdf837d Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Mon, 23 Oct 2023 22:01:57 +0900 Subject: [PATCH 1/4] =?UTF-8?q?[ADD]=20#202=20-=20=EC=95=88=EB=82=B4=20?= =?UTF-8?q?=EB=AC=B8=EA=B5=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/VC/MyCourseSelectVC.swift | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift index 127d8e9b..e2b4549f 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift @@ -29,7 +29,13 @@ class MyCourseSelectVC: UIViewController { // MARK: - UI Components private lazy var navibar = CustomNavigationBar(self, type: .titleWithLeftButton).setTitle("불러오기") - + private let firstDivideView = UIView() + private let guidelineView = UIView() + private let guidelineLabel = UILabel().then { + $0.text = "모든 코스는 한 번만 업로드할 수 있어요" + $0.font = .b4 + $0.textColor = .g2 + } private lazy var selectButton = CustomButton(title: "선택하기").setEnabled(false).then { $0.isHidden = true } @@ -127,10 +133,11 @@ extension MyCourseSelectVC { view.backgroundColor = .w1 self.tabBarController?.tabBar.isHidden = true self.emptyView.isHidden = true + firstDivideView.backgroundColor = .g4 } private func setLayout() { - view.addSubviews(selectButton, mapCollectionView) + view.addSubviews(firstDivideView, guidelineView, guidelineLabel, selectButton, mapCollectionView) self.view.bringSubviewToFront(selectButton) mapCollectionView.addSubview(emptyView) @@ -140,8 +147,25 @@ extension MyCourseSelectVC { make.bottom.equalToSuperview().inset(34) } - mapCollectionView.snp.makeConstraints { make in + firstDivideView.snp.makeConstraints { make in make.top.equalTo(navibar.snp.bottom) + make.leading.trailing.equalToSuperview() + make.height.equalTo(1) + } + + guidelineView.snp.makeConstraints { make in + make.top.equalTo(firstDivideView.snp.bottom) + make.leading.trailing.equalToSuperview() + make.height.equalTo(35) + } + + guidelineLabel.snp.makeConstraints { make in + make.centerX.equalTo(guidelineView) + make.top.equalTo(guidelineView.snp.top).offset(8) + } + + mapCollectionView.snp.makeConstraints { make in + make.top.equalTo(guidelineView.snp.bottom) make.leading.trailing.equalTo(view.safeAreaLayoutGuide) make.bottom.equalTo(selectButton.snp.top).inset(-25) } From 064fb4f9d0cf471b84bdbe1f8e44fa21a07b20da Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Mon, 23 Oct 2023 22:02:40 +0900 Subject: [PATCH 2/4] =?UTF-8?q?[ADD]=20#202=20-=20=EC=BD=94=EC=8A=A4=20?= =?UTF-8?q?=EC=97=86=EC=9D=84=EB=95=8C=20Hidden=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CourseDiscovery/Views/VC/MyCourseSelectVC.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift index e2b4549f..8ddbe070 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift @@ -88,6 +88,9 @@ extension MyCourseSelectVC { self.courseList = courseList mapCollectionView.reloadData() self.emptyView.isHidden = !courseList.isEmpty + self.firstDivideView.isHidden = courseList.isEmpty + self.guidelineView.isHidden = courseList.isEmpty + self.guidelineLabel.isHidden = courseList.isEmpty self.selectButton.isHidden = courseList.isEmpty } From c6a365a910afdf5faa9190884b2c0bf48123ebd8 Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Mon, 23 Oct 2023 22:06:32 +0900 Subject: [PATCH 3/4] =?UTF-8?q?[Fix]=20#202=20-=20=EC=BB=AC=EB=A0=89?= =?UTF-8?q?=EC=85=98=20=EB=B7=B0=20=EC=A0=9C=EC=95=BD=EC=A1=B0=EA=B1=B4=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 안내 문구 레이아웃을 위해 맨 윗줄은 컬렉션 뷰에 맞게 설정 --- .../CourseDiscovery/Views/VC/MyCourseSelectVC.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift index 8ddbe070..1e75b9c3 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift @@ -235,7 +235,13 @@ extension MyCourseSelectVC: UICollectionViewDelegateFlowLayout { } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { - return self.collectionViewInset + if section == 0 { + // Apply custom inset for the first section (top) + return UIEdgeInsets(top: 0, left: self.collectionViewInset.left, bottom: self.collectionViewInset.bottom, right: self.collectionViewInset.right) + } else { + // Use the regular inset for other sections + return self.collectionViewInset + } } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { From b43c753937de21f54931843a970d03af05f62c04 Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Mon, 23 Oct 2023 22:11:43 +0900 Subject: [PATCH 4/4] =?UTF-8?q?[Fix]=20#202=20-=20guidelineView=20?= =?UTF-8?q?=EB=A0=88=EC=9D=B4=EC=95=84=EC=9B=83=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CourseDiscovery/Views/VC/MyCourseSelectVC.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift index 1e75b9c3..def8d8dc 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/MyCourseSelectVC.swift @@ -159,7 +159,7 @@ extension MyCourseSelectVC { guidelineView.snp.makeConstraints { make in make.top.equalTo(firstDivideView.snp.bottom) make.leading.trailing.equalToSuperview() - make.height.equalTo(35) + make.height.equalTo(36) } guidelineLabel.snp.makeConstraints { make in