-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
id를 통해 아이템을 잘 불러오기 위함
var dayString: String | ||
if day < 9 { | ||
dayString = "Day 0\(day + 1)" | ||
} else { | ||
dayString = "Day \(day + 1)" | ||
} |
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.
이런 코드면 computedProperty로 만들어 보거나 최신 스위프트 문법을 활용해보는건 어떨까요?
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.
적용한 커밋입니다! 3734994
|
||
import UIKit | ||
|
||
class RoundedBackgroundView: UICollectionReusableView { |
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.
더이상 상속받는 곳이 없다면 습관처럼 final을 붙여주시면 좋습니다.
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.
적용한 커밋입니다! 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>! |
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.
<TrainingLevel.ID, DailyRoutine.ID>
이렇게 길게 사용되는 부분들은 typealias로 하면 좋을것 같습니다.
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.
적용한 커밋입니다! 04e6cd3
addSubviews() | ||
} | ||
|
||
override func updateConstraints() { | ||
layout() |
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.
이렇게 되면 매번 Layout이 호출되기에 중복방지를 하면 좋을것 같습니다.
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.
적용한 커밋입니다! d965b20
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 1 New issue |
No description provided.