-
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
[Feat/NST-13] 회의확정 확인뷰 #37
base: main
Are you sure you want to change the base?
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.
야무집니다 멘션한 내용 한번만 확인 부탁드려요!
final class MemberAvailabilityCellReactor: Reactor { | ||
typealias Action = NoAction | ||
struct State { | ||
let user: User | ||
let status: MemberStatus | ||
} |
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.
오! Reactor를 분리해서 관리하시나요! 좋습니다 👍👍👍
혹시 이렇게 진행하게된 이유를 여쭤봐도 될까요?
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.
cell의 reactor를 가질 경우 별도의 바인딩 구현 없이 vc에서 바로 reactor를 주입할 수 있습니다 !
availableLabel.snp.remakeConstraints { | ||
$0.top.equalTo(scheduleDurationLabel.snp.bottom).offset(16) | ||
$0.leading.equalTo(scheduleDurationLabel) | ||
} |
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.
remakeConstraint는 기존 제약을 모두 삭제하고 다시 만드는 메서드라서,
의도하신 방향과 부합한지 다시 한번 체크부탁드려요!
참고용으로, 필요한 제약사항만 업데이트 하는경우 updateConstraints도 있습니다!
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.
오오 update가 나을거같네요
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.
그냥 setUpLayout에서 삼항연산자 썼습니다 ㅋㅋ
.bind(to: rootView.scheduleInfoView.unavailableCollectionView.rx.items(dataSource: unavailableDataSource)) | ||
.disposed(by: disposeBag) | ||
|
||
reactor.state.map { $0.schedule } |
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.
map해서 뽑아쓰는 습관 매우 굳 👍
scheduleDurationLabel.isHidden = false | ||
likeButton.isHidden = false | ||
scheduleTimeTitleLabel.isHidden = true | ||
scheduleTimeLabel.isHidden = true | ||
scheduleCategoryLabel.isHidden = true | ||
scheduleCategoryChip.isHidden = true | ||
|
||
availableLabel.snp.remakeConstraints { | ||
$0.top.equalTo(scheduleDurationLabel.snp.bottom).offset(16) | ||
$0.leading.equalTo(scheduleDurationLabel) | ||
} | ||
|
||
case .confirmed: | ||
scheduleDurationLabel.isHidden = true | ||
likeButton.isHidden = true | ||
scheduleTimeTitleLabel.isHidden = false | ||
scheduleTimeLabel.isHidden = false | ||
scheduleCategoryLabel.isHidden = false | ||
scheduleCategoryChip.isHidden = false |
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.
여기 상태관리는 함수 하나로 통일해서 좋을 것 같아요
파라미터로 Bool값 받아서, 재사용 하면 보기 좋을 듯 !!
case .MMddHHmm: | ||
return "MM/dd HH:mm" |
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.
잘 쓰는 구만
import RxCocoa | ||
import RxDataSources | ||
|
||
final class ScheduleConfirmedViewController: UIViewController, View, UIScrollViewDelegate { |
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.
UIScrollViewDelegate 이건 어디에 쓰나요?
쓰는곳이 있다면 extension으로 빼서 사용하면 가독성에 좋을 것 같아요
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.
이건 빼고 올릴게요
make.height.equalTo(0) | ||
} | ||
|
||
rootView.scheduleInfoView.availableCollectionView.rx.observe(CGSize.self, "contentSize") |
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.
observe 는 어떨때 쓰여요?
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.
셀의 크기가 변할 때마다 호출됩니다 !!
셀의 길이가 컬뷰의 길이보다 클 때, 컬뷰의 height를 재조정해주어야해서 작성되었습니다
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.
굿 고생하셨습니다.
🔥 Issue
close #30
🔥 변경된 내용
🔥 PR Point
setUpCollectionView()
는 delegate 설정 및 셀 좌측 정렬하는 함수입니다bindCollectionViewHeight()
는 셀 줄바꿈에 따른 collectionview 높이 조정하는 함수입니다🔥 ScreenShot