-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] #78 - 활동 기록 API 연결 #83
The head ref may contain hidden characters: "feat/#78-\uD65C\uB3D9-\uAE30\uB85D-API-\uC5F0\uACB0"
[Feat] #78 - 활동 기록 API 연결 #83
Conversation
스택뷰 안의 요소들 너비와 이를 감싸는 스택뷰 너비를 이중으로 설정해서 생긴 문제.. 해결..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다~!! 리뷰 반영해서 머지 해주세요!!
|
||
// MARK: - Record | ||
|
||
struct Record: Codable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 친구 이름을 ActivityRecord 하는게 좋아보여요!
// 날짜 바꾸기 | ||
let activityRecordDate = model.createdAt.prefix(10) | ||
let dateFormatter = DateFormatter() | ||
dateFormatter.dateFormat = "yyyy-MM-dd" | ||
let convertDate = dateFormatter.date(from: String(activityRecordDate)) | ||
guard let convertDate = convertDate else { return } | ||
|
||
let resultDateFormatter = DateFormatter() | ||
resultDateFormatter.dateFormat = "yyyy.MM.dd" | ||
let resultDate = resultDateFormatter.string(from: convertDate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 친구들은 따로 함수로 만드는게 좋아보여요!
RNTimeFormatter.swift 에 이런 시간 포매팅 관련 함수들을 모으고 있어서 거기에 만들어도 좋을 거 같아요!! 함수 앞에 static을 붙이면 RNTimeFormatter.만든함수() 이렇게 인스턴스를 만들지 않고 사용할 수 있어요!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
대박
let activityRecordRunningTime = model.time.suffix(7) | ||
|
||
// 평균 페이스 바꾸기 | ||
let activityRecordAveragePace = model.pace | ||
let array = activityRecordAveragePace.split(separator: ":").map { String($0) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이런 코드도 함수로 따로 빼서 만듭시다!
🌱 작업한 내용
🌱 PR Point
📸 스크린샷
생략
📮 관련 이슈