-
Notifications
You must be signed in to change notification settings - Fork 1
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] #39 - Carousel 수정 #97
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.
역시 코딩의 신 쏘이!
배워 가요! 👍👍
VStack(spacing: 0) { | ||
musicInformation | ||
cdList | ||
cdPlayer |
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.
뷰를 구조체 만들지 않고 변수로 할당하신 이유가 궁금합니다!
구조체로 작성하게되면 유지보수가 훨씬 쉬울 거 같기도 해서요!
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.
작업했을 때, 기존에 Item을 뷰마다 fetch하는 방식(cd list view, snap carousel view)에서 벗어나고 싶었어요!
그러다보니 모두 같은 데이터를 공유한다고 생각해서 변수로 할당했었어요
근데 융식 리뷰 보면서 생각해보니 Binding을 사용해서 구조체로 분리할 수 있을 것 같네요!
안 그래도 해당 뷰의 길이가 너무 길어서 고민이었는데 리팩토링 해보겠슴다 ◡̈
private let cdSize: CGFloat = UIScreen.getWidth(200) | ||
|
||
private var firstItemPositionX: CGFloat { | ||
(cdSize * CGFloat(max(0, items.count - 1)) + spacing * CGFloat(max(0, items.count - 1))) / 2 + size.width / 2 |
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.
엄청나네요!👍👍
@YunSeok-Choi 리팩토링 진행했습니다! |
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.
개발천재 쏘이~~~ 캐러셀을 깔끔하게 구현하셨네요!! 오늘도 배워갑니다!!
뷰 이름들 중 CdListView, CdPlayer만 d가 대문자가 아닌데 혹시 다른 이유가 없다면 대문자나 소문자 둘 중하나로 맞추는건 어떤가요??
Co-authored-by: JMM00 <cjjunn0827@gmail.com>
회의 결과에 따라 CD로 모두 통일하여 머지하였습니다~!👍✨ |
Keychanges
Screenshots
2023-02-23.1.14.40.mov
To Reviewer
index 1 beyond bounds [0 .. 0]