From e4f668017de73e1d94e75d2706a5e360e5750b87 Mon Sep 17 00:00:00 2001 From: dlwogus0128 <79050615+dlwogus0128@users.noreply.github.com> Date: Thu, 5 Jan 2023 01:19:56 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20#31=20-=20UICollectionViewCell=20?= =?UTF-8?q?=EA=B0=84=20=EA=B0=84=EA=B2=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GoalRewardInfoCollectionView/GoalRewardInfoCVC.swift | 9 +-------- .../Presentation/MyPage/VC/InfoVC/GoalRewardInfoVC.swift | 3 ++- .../UploadedCourseInfoCVC.swift | 9 ++------- .../MyPage/VC/InfoVC/UploadedCourseInfoVC.swift | 3 ++- 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoCollectionView/GoalRewardInfoCVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoCollectionView/GoalRewardInfoCVC.swift index 44766f52..a1519f8c 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoCollectionView/GoalRewardInfoCVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoCollectionView/GoalRewardInfoCVC.swift @@ -40,16 +40,9 @@ extension GoalRewardInfoCVC { private func setLayout() { contentView.addSubviews(stampImageView, stampStandardLabel) - contentView.snp.makeConstraints { make in - make.top.equalToSuperview() - make.centerX.equalToSuperview() - make.leading.equalToSuperview() - make.height.equalTo(112) - } - stampImageView.snp.makeConstraints { make in make.top.leading.trailing.equalToSuperview() - make.width.equalTo(90) + make.height.equalTo(contentView.snp.width) } stampStandardLabel.snp.makeConstraints { make in diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoVC.swift index 9b7f69b4..af4451db 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/GoalRewardInfoVC.swift @@ -136,7 +136,8 @@ extension GoalRewardInfoVC: UICollectionViewDelegateFlowLayout { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { let screenWidth = UIScreen.main.bounds.width let tripleCellWidth = screenWidth - stampInset.left - stampInset.right - stampItemSpacing * 2 - return CGSize(width: tripleCellWidth / 3, height: 112) + let cellHeight = tripleCellWidth / 3 + 22 + return CGSize(width: tripleCellWidth / 3, height: cellHeight) } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoCollectionView/UploadedCourseInfoCVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoCollectionView/UploadedCourseInfoCVC.swift index cc844ef1..c31435dd 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoCollectionView/UploadedCourseInfoCVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoCollectionView/UploadedCourseInfoCVC.swift @@ -51,14 +51,9 @@ extension UploadedCourseInfoCVC { private func setLayout() { contentView.addSubviews(uploadedCourseMapImage, uploadedCourseTitleLabel, uploadedCoursePlaceLabel) - contentView.snp.makeConstraints { make in - make.top.leading.equalToSuperview() - } - uploadedCourseMapImage.snp.makeConstraints { make in - make.top.leading.equalToSuperview() - make.width.equalTo(174) - make.height.equalTo(124) + make.top.leading.trailing.equalToSuperview() + make.height.equalTo(contentView.snp.width).multipliedBy(0.7) } uploadedCourseTitleLabel.snp.makeConstraints { make in diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoVC.swift index 35426c86..5e88188c 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoVC.swift @@ -102,7 +102,8 @@ extension UploadedCourseInfoVC: UICollectionViewDelegateFlowLayout { func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { let screenWidth = UIScreen.main.bounds.width let doubleCellWidth = screenWidth - uploadedCourseInset.left - uploadedCourseInset.right - uploadedCourseItemSpacing - return CGSize(width: doubleCellWidth / 2, height: 164) + let cellHeight = (doubleCellWidth / 2) * 0.7 + 36 + return CGSize(width: doubleCellWidth / 2, height: cellHeight) } func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {