Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Runners_Hi/Runners_Hi/Source/Cell/ScoreRecordCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))


}

}
27 changes: 14 additions & 13 deletions Runners_Hi/Runners_Hi/Source/ViewController/MyPageVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

class MyPageVC: UIViewController {
class MyPageVC: UIViewController, UICollectionViewDelegate {
static let identifier: String = "MyPageVC"

// Mark: Variable Part
Expand Down Expand Up @@ -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)

Expand All @@ -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:
Expand Down Expand Up @@ -112,7 +112,7 @@ extension MyPageVC {
self.myPageCollectionView.reloadData()
self.myPageCollectionView.dataSource = self
self.myPageCollectionView.delegate = self


case .requestErr:
print(".requestErr")
Expand All @@ -127,3 +127,4 @@ extension MyPageVC {
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,22 @@ 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()
}

}


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 {
Expand Down Expand Up @@ -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<Result>
self.RecordModel = response
self.scoreRecordCollectionView.reloadData()

case .requestErr:
print(".requestErr")
case .pathErr:
Expand Down