Skip to content
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

UIcompositionalLayout, UICollectionViewDiffableDataSource 적용 #12

Merged
merged 15 commits into from
Jan 21, 2024

Conversation

Peter1119
Copy link
Collaborator

No description provided.

@Peter1119 Peter1119 self-assigned this Jan 16, 2024
Comment on lines 32 to 37
var dayString: String
if day < 9 {
dayString = "Day 0\(day + 1)"
} else {
dayString = "Day \(day + 1)"
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런 코드면 computedProperty로 만들어 보거나 최신 스위프트 문법을 활용해보는건 어떨까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

적용한 커밋입니다! 3734994


import UIKit

class RoundedBackgroundView: UICollectionReusableView {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

더이상 상속받는 곳이 없다면 습관처럼 final을 붙여주시면 좋습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

적용한 커밋입니다! 11503d1

private let viewModel: MainViewModel
private var cancellables = Set<AnyCancellable>()

private let titleLocalized = String(localized: "MAIN_TITLE_LABEL",
defaultValue: "Just Do It!",
comment: "메인 화면의 타이틀 텍스트")

var dataSource: UICollectionViewDiffableDataSource<TrainingLevel.ID, DailyRoutine.ID>!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<TrainingLevel.ID, DailyRoutine.ID>
이렇게 길게 사용되는 부분들은 typealias로 하면 좋을것 같습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

적용한 커밋입니다! 04e6cd3

addSubviews()
}

override func updateConstraints() {
layout()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 되면 매번 Layout이 호출되기에 중복방지를 하면 좋을것 같습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

적용한 커밋입니다! d965b20

Copy link

sonarcloud bot commented Jan 17, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@Peter1119 Peter1119 merged commit 5f6955d into main Jan 21, 2024
2 checks passed
@Peter1119 Peter1119 deleted the refactor/diffableDataSource branch January 21, 2024 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants