-
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
3주차 과제 PR #24
3주차 과제 PR #24
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.
뭐야 이렇게 잘할수있냐구요...질문만 남기고 갑니다 >< FOX언니.. 3주차 과제도 수고 많았우~!!
var cellHeight: CGFloat = 0 | ||
switch indexPath.item { | ||
case 0: cellHeight = 72 | ||
default: cellHeight = 488 + (CGFloat)((indexPath.item-1) * 12) |
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.
이건 제가,, 억지로 셀 사이즈를 늘려버리기 위해 일케 쓴 거라서
신경쓰지 않아도 되는 ,, 억지 코드 ^___^~
} | ||
|
||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | ||
if indexPath.item == 0 { |
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.
indexPath.item이 indexPath.section이랑 같은역할을 하는 건가요?
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.
indexPath.row랑!!! section이랑은 달라요!
하나의 section 안에 여러개의 row가 들어가있는 고런 느낌~!
@objc private func refreshCollectionView(refresh: UIRefreshControl) { | ||
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { | ||
self.collectionView.reloadData() | ||
refresh.endRefreshing() | ||
} | ||
} |
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.
저건 그냥 원하는 시간 차 두고 실행하고 싶을 때 쓰는건데
refreshControl 때문에 가져다 넣었답니닷,,~!
서버 연결 함수와 함께라면,, 이해가 잘 갈텐데,, 서버가 없네,,
🌱 작업한 내용
과제를 했습니다
🌱 PR Point
하트 버튼 누르면 이벤트는 그냥 로그인 창 모달로 올라오게 아무거나 넣었고요,, (의미 없음)
... 테이블뷰를안써버렷어요 미안합니다..
셀 사이즈 다르게 하는 건.. 일단 그냥 수식으로 냅다 계산해놓고 바꾸려고 했는데.. 벌써 금요일이 되었네요
테이블 뷰로 바꿔서 .. 제대로 된 코드로 빨리 올려볼게요.. 그래서 리뷰어 등록을 아직 안해놨습니다..
📸 스크린샷
..미안합니다 빠르게 올리겠습니다?
📮 관련 이슈