APP-iOS5th / FinalProject-RideThis

RideThis는 실내외 어디서든 속도, 거리, 칼로리 등의 정보를 확인하고, 기록 분석과 경쟁을 통해 성장을 추적할 수 있습니다.
https://app-ios5th.github.io/FinalProject-RideThis/
2 stars 1 forks source link

Feat/seong kook #6

Closed SeongKookKIM closed 1 month ago

SeongKookKIM commented 1 month ago
  1. 기록 요약 UI (익스텐션으로 뷰 분리)
  2. View로 기록인지 요약인지 분리
    
    private let timerRecord = RecordContainer(title: "Timer", recordText: "00:00", view: "record")

private let calorieRecord = RecordContainer(title: "Calories", recordText: "0 kcal", view: "summary")

3. 텍스트 업데이트 시 updateRecordText()함수 생성, formattedWithThousandsSeparator로 1,000 단위(Double -> Stirng)
```Swift
timerRecord.updateRecordText(text: viewModel.timer)
cadenceRecord.updateRecordText(text: "\(viewModel.cadence.formattedWithThousandsSeparator()) RPM")
 speedRecord.updateRecordText(text: "\(viewModel.speed.formattedWithThousandsSeparator()) Km/h")
 distanceRecord.updateRecordText(text: "\(viewModel.distance.formattedWithThousandsSeparator()) Km")
 calorieRecord.updateRecordText(text: "\(viewModel.calorie.formattedWithThousandsSeparator()) Kcal")