-
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] #16 - 리뷰 작성 VC UI 우선 구현 #30
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.
수고하셨습니다 : ) D-11까지 화이팅
self.bakeryImageView.image = bakeryImage | ||
self.regionStackView.configureStackView(with: regions) |
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.
p1: 초기화, 생명주기 안에는 함수만 선언해주세요 :)
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.
반영했습니다 !
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: OptionsCollectionViewCell.identifier, for: indexPath) as? OptionsCollectionViewCell | ||
else { return UICollectionViewCell() } |
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.
p1: let cell: OptionsCollectionViewcell = collectionView.dequeueReusableCell(for: indexPath)
로 변경 부탁드려요:)
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.
엇 요건 아래에 OptionsCollectionView 에서 선언한 메소드를 사용하기 위해 다운캐스팅이 필요해 guard-let 문을 사용한겁니다 !
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.
func dequeueReusableCell<T: UICollectionViewCell>(for indexPath: IndexPath) -> T {
guard let cell = dequeueReusableCell(withReuseIdentifier: T.identifier, for: indexPath) as? T else {
fatalError("Could not dequeue cell with identifier: \(T.identifier)")
}
return cell
}
} | ||
|
||
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { | ||
guard let header = collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: OptionsCollectionViewHeader.identifier, for: indexPath) as? OptionsCollectionViewHeader |
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.
p1: let header: OptionsCollectionViewHeader = collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, indexPath: indexPath)
로 변경해주세요 :)
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.
요것도 위의 것과 같은 맥락에서 다운캐스팅 하였습니다 !
case likeCollectionView: | ||
header.configureTitle(to: "건빵집은 어떠셨나요?") | ||
header.isEnabled.toggle() | ||
case optionsCollectionView: | ||
header.configureTitle(to: "어떤것을 추천하나요?") |
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.
p1: 리터럴 수정부탁드립니다 :)
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.
코리 달 게 없네욤 갓.벽 ㅋㅋ^
나중에 컬렉션 뷰 부분 참고해서 해야징~ 고생하셨습니다
🌁 Background
리뷰 작성하는 뷰의 UI 구현입니다
기능이랑 플로우까지 구현하면 너무 양이 많아질 것 같아서 쪼겠숩니다
머지되기 전까지 요 브랜치에서 새로운 브랜치 파고 작업할게요 ~
📱 Screenshot
👩💻 Contents
RegionStackView
: 초록색 칩 UI 입니닷configureStackView
의 입력값으로 [String] 을 받는데, 여기에 요소들 각각이 하나의 칩으로 형성됩니닷BakeryOverviewView
: WriteReviewViewController 의 상단 부분인데, 빵집에 대해 보여주는 부분입니닷OptionsCollection
: 리뷰 작성할 때 '좋아요' '별로예요' 등의 옵션을 선택하는 CollectionView 입니닷ReviewDetailTextView
: 리뷰의 상세 내용을 작성하는 부분입니닷..! View 로 뺀 이유는 하단에 다른 레이블도 있는데, 그냥 여기에서 한 번에 만드는게 편할 것 같아서요 !✅ Testing
제 브랜치로 오셔서 SceneDelegate 의 rootVC 바꾸고 실행시켜보십셔
📝 Review Note
📣 Related Issue
📬 Reference