diff --git a/Runners_Hi/Runners_Hi/Source/Cell/ScoreRecordCell.swift b/Runners_Hi/Runners_Hi/Source/Cell/ScoreRecordCell.swift index f5fbb82..0c64fad 100644 --- a/Runners_Hi/Runners_Hi/Source/Cell/ScoreRecordCell.swift +++ b/Runners_Hi/Runners_Hi/Source/Cell/ScoreRecordCell.swift @@ -26,13 +26,13 @@ class ScoreRecordCell: UICollectionViewCell { scoreDateLabel.font = UIFont(name:"NanumSquareR", size:12.0) scoreDateLabel.textColor = .brownishGrey getKmLabel.font = UIFont(name:"AvenirNext-BoldItalic", size:28.0) - KmNameLabel.font = UIFont(name:"NanumSquareR", size:14.0) getTimeLabel.font = UIFont(name:"AvenirNext-BoldItalic", size:28.0) - TimeNameLabel.font = UIFont(name:"NanumSquareR", size:12.0) - - self.KmNameLabel.text = "킬로미터" - self.TimeNameLabel.text = "러닝시간" + // font 익스텐션 적용 + KmNameLabel.setLabel(text: "킬로미터", color: .black, font: .nanumBold(size: 14.0)) + TimeNameLabel.setLabel(text: "러닝시간", color: .black, font: .nanumBold(size: 12.0)) + + } } diff --git a/Runners_Hi/Runners_Hi/Source/ViewController/MyPageVC.swift b/Runners_Hi/Runners_Hi/Source/ViewController/MyPageVC.swift index 45cf8db..208ebc2 100644 --- a/Runners_Hi/Runners_Hi/Source/ViewController/MyPageVC.swift +++ b/Runners_Hi/Runners_Hi/Source/ViewController/MyPageVC.swift @@ -8,7 +8,7 @@ import UIKit -class MyPageVC: UIViewController { +class MyPageVC: UIViewController, UICollectionViewDelegate { static let identifier: String = "MyPageVC" // Mark: Variable Part @@ -37,7 +37,7 @@ extension MyPageVC: UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { guard let ProfileBadgeCell = collectionView.dequeueReusableCell(withReuseIdentifier: ProfileBadgeCell.identifier, for: indexPath) as? ProfileBadgeCell else { return UICollectionViewCell()} - + // 해당 셀에 데이터를 전달하고, 데이터에 맞게 뱃지를 세팅하도록 하는 함수를 호출한다 ProfileBadgeCell.setMyProfileBadgeData(data: MyProfileModel, index: indexPath.row) @@ -53,19 +53,19 @@ extension MyPageVC: UICollectionViewDataSource { MyProfileHeader.myPageHeaderData(data: MyProfileModel) return MyProfileHeader - default: assert(false, "오류") } + default: assert(false, "오류") + + } + + + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { + let width: CGFloat = collectionView.frame.width + let height: CGFloat = 359 + return CGSize(width: width, height: height) } } - - - - func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { - let width: CGFloat = collectionView.frame.width - let height: CGFloat = 359 - return CGSize(width: width, height: height) } - } - extension MyPageVC: UICollectionViewDelegateFlowLayout{ func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: @@ -112,7 +112,7 @@ extension MyPageVC { self.myPageCollectionView.reloadData() self.myPageCollectionView.dataSource = self self.myPageCollectionView.delegate = self - + case .requestErr: print(".requestErr") @@ -127,3 +127,4 @@ extension MyPageVC { } } } + diff --git a/Runners_Hi/Runners_Hi/Source/ViewController/RecordTabChildVC1.swift b/Runners_Hi/Runners_Hi/Source/ViewController/RecordTabChildVC1.swift index aa604db..12b4576 100644 --- a/Runners_Hi/Runners_Hi/Source/ViewController/RecordTabChildVC1.swift +++ b/Runners_Hi/Runners_Hi/Source/ViewController/RecordTabChildVC1.swift @@ -14,14 +14,13 @@ class RecordTabChildVC1: UIViewController { @IBOutlet weak var scoreRecordCollectionView: UICollectionView! override func viewDidLoad() { - + super.viewDidLoad() self.view.backgroundColor = .backgroundgray self.scoreRecordCollectionView.backgroundColor = .backgroundgray + getRecord() scoreRecordCollectionView.dataSource = self scoreRecordCollectionView.delegate = self - super.viewDidLoad() - getRecord() - self.scoreRecordCollectionView.reloadData() + // self.scoreRecordCollectionView.reloadData() } } @@ -29,8 +28,8 @@ class RecordTabChildVC1: UIViewController { extension RecordTabChildVC1: UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { -// return 20 - return RecordModel?.data.count ?? 0 + return 20 + //return RecordModel?.data.count ?? 0 } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { @@ -116,12 +115,10 @@ extension RecordTabChildVC1 { data in guard let `self` = self else {return} switch data { - case .success(let res): let response = res as? RecordAllData self.RecordModel = response self.scoreRecordCollectionView.reloadData() - case .requestErr: print(".requestErr") case .pathErr: