Skip to content
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

Merged
merged 2 commits into from
May 10, 2022
Merged

3주차 과제 PR #24

merged 2 commits into from
May 10, 2022

Conversation

meenyweeny
Copy link
Member

@meenyweeny meenyweeny commented May 6, 2022

🌱 작업한 내용

과제를 했습니다

🌱 PR Point

하트 버튼 누르면 이벤트는 그냥 로그인 창 모달로 올라오게 아무거나 넣었고요,, (의미 없음)
... 테이블뷰를안써버렷어요 미안합니다..
셀 사이즈 다르게 하는 건.. 일단 그냥 수식으로 냅다 계산해놓고 바꾸려고 했는데.. 벌써 금요일이 되었네요
테이블 뷰로 바꿔서 .. 제대로 된 코드로 빨리 올려볼게요.. 그래서 리뷰어 등록을 아직 안해놨습니다..

📸 스크린샷

..미안합니다 빠르게 올리겠습니다?

📮 관련 이슈

Copy link

@0lynny 0lynny left a 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)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 복잡해 보이는 수식은 뭔가요..?

Copy link
Member Author

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 {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indexPath.item이 indexPath.section이랑 같은역할을 하는 건가요?

Copy link
Member Author

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가 들어가있는 고런 느낌~!

Comment on lines +48 to +53
@objc private func refreshCollectionView(refresh: UIRefreshControl) {
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
self.collectionView.reloadData()
refresh.endRefreshing()
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드..설명해주데요 어려워보여요..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저건 그냥 원하는 시간 차 두고 실행하고 싶을 때 쓰는건데
refreshControl 때문에 가져다 넣었답니닷,,~!

서버 연결 함수와 함께라면,, 이해가 잘 갈텐데,, 서버가 없네,,

@meenyweeny meenyweeny merged commit bc74347 into main May 10, 2022
@meenyweeny meenyweeny deleted the feat/#23 branch May 10, 2022 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] iOS 3주차 과제
2 participants