Skip to content

Commit

Permalink
[Network/#10] Statues binding
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoe0929 committed Jan 19, 2024
1 parent d53cf30 commit 14c17a3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ extension ChallengeView: UICollectionViewDataSource {
let appGoalHour = convertMillisecondsToHoursAndMinutes(milliseconds: appList[indexPath.item].goalTime).hours
let appGoalMin = convertMillisecondsToHoursAndMinutes(milliseconds: appList[indexPath.item].goalTime).minutes
let appTimeString = appGoalMin<0 ? "\(appGoalHour)" : "\(appGoalHour)\(appGoalMin)"
cell.configureCell(appName: "인스타그램", appTime: "\(appGoalHour)")
cell.configureCell(appName: "인스타그램", appTime: appTimeString)
return cell
default:
return UICollectionViewCell()
Expand All @@ -177,8 +177,9 @@ extension ChallengeView: UICollectionViewDataSource {
if kind == StringLiteral.Challenge.Idetifier.titleHeaderViewId {
guard let header = collectionView.dequeueReusableSupplementaryView(ofKind: StringLiteral.Challenge.Idetifier.titleHeaderViewId, withReuseIdentifier: TitleCollectionReusableView.identifier, for: indexPath) as? TitleCollectionReusableView
else { return UICollectionReusableView() }
let time = convertHoursAndMinutesToMilliseconds(hours: 3, minutes: 0)
header.configureTitle(hour: time)

let goalTime = convertMillisecondsToHoursAndMinutes(milliseconds: goalTimeHour).hours
header.configureTitle(hour: goalTime)
header.backgroundType = challengeType
header.button.addTarget(self, action: #selector(onTapButton), for: .touchUpInside)
return header
Expand Down

0 comments on commit 14c17a3

Please sign in to comment.