Feature/homeview#31
Merged
giseungNoh merged 6 commits intodevfrom Jun 11, 2025
Merged
Conversation
|
You've used up your 5 PR reviews for this month under the Korbit Starter Plan. You'll get 5 more reviews on June 22nd, 2025 or you can upgrade to Pro for unlimited PR reviews and enhanced features in your Korbit Console. |
Comment on lines
+126
to
+133
| //섹션마다의 여백 | ||
| func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { | ||
| let width = collectionView.bounds.width | ||
| let height = collectionView.bounds.height | ||
| let isPhonePortrait = traitCollection.userInterfaceIdiom == .phone && width < height | ||
|
|
||
| return isPhonePortrait ? .zero : UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10) | ||
| } |
Collaborator
There was a problem hiding this comment.
이 부분이 CollectionView Section 사이 여백인가요?
지금 이 뷰에서는 Section이 하나인 것 같아서 여쭤봅니당
Collaborator
Author
There was a problem hiding this comment.
셀과 셀 사이의 여백입니다. 섹션은 하나이고 그 안에 셀 들이 구성되어 있습니다. 아이폰 세로모드일때는 0을 줘서 이미지뷰 꽉차게 보여주고 그 외에는 여백을 10 씩 줘서 셀 사이가 너무 붙거나 떨어지지 않게 해뒀습니다!
Comment on lines
+35
to
+44
| override func prepareForReuse() { | ||
| super.prepareForReuse() | ||
|
|
||
| // 이전 내용 초기화 (재사용 오류 방지) | ||
| thumnail.image = nil | ||
| userImage.image = nil | ||
| userNameLabel.text = nil | ||
| viewsLabel.text = nil | ||
| durationLabel.text = nil | ||
| } |
Collaborator
There was a problem hiding this comment.
이 부분 코드는 어떤 상황에 의미가 있는지 궁금합니당
Collaborator
Author
There was a problem hiding this comment.
셀 재사용 하면 이전에 이미지가 표시 될 수 있다고 하더라고요 실제로 이 코드 없이 실행하니까 뷰가 망가졌습니다.. 그래서 셀을 재사용 하기전에 초기화 하는 작업입니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
---다음 할 일(컴포넌트 단위로 작업)---
-썸네일 이미지
1.클릭시 시청기록에도 반영
2.클릭시 태그목록,조회 수 코어데이터로 전달
3.플레이어 뷰로 이동
4.그 외 고려해야 할 사항있으면 알려주시면 감사하겠습니다!