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

[FEAT] #226 - 메인 무한스크롤 구현 및 data 모델 정리 #227

Merged
merged 5 commits into from
Dec 26, 2021

Conversation

hyun99999
Copy link
Member

🌴 PR 요약

🌱 작업한 브랜치

🌱 작업한 내용

민재꺼와 컨플릭트를 해결하다보니 커밋파일수가 많습니다...! 그래도 민재꺼부터 보시고 오시면 무엇이 바뀌었는지 보시기 쉬우실거에요!

  • 메인 무한스크롤 구현: didScroll() 델리게이트 메서드에서 contentOffset.y 가 (모든 컨텐츠가 들어간 사이즈 - 뷰에서 카드스와이퍼의 높이) 보다 클 경우 서버호출(즉, 앞으로 보여질 컨텐츠 사이즈 보다 화면의 y 축 스크롤을 많이 했다.)
  • CarClass 삭제 및 그로인하 코드 리펙토링
  • MainListRequest 사용하지 않아 삭제
  • init(from) 이라는 사용하지 않는 이니셜라이저 일단 주석처리
  • viewWillAppear 에서 카드리스트 서버통신

@mini-min 선생님
cardListFetch 에서 offset nil 일 경우 "" 빈문자열로 대체했는데 이렇게 하면 괜찮죠?

📸 스크린샷

기능 스크린샷
무한스크롤

📮 관련 이슈

- 메인스크롤 구현
- data 모델 정리
- CardClass 삭제
- MainListRequest 삭제(사용하지 않음)
- viewWillAppear 일때 메인 카드 리스트 서버통신
…orRelease into release1.0/#226

# Conflicts:
#	NADA-iOS-forRelease/Sources/ViewControllers/Main/FrontViewController.swift
@hyun99999 hyun99999 added Hyungyu 🐯 현규 교수님 작업 P1 / Priority High 우선순위 높음 Feat 새로운 기능 구현 labels Dec 26, 2021
@hyun99999 hyun99999 self-assigned this Dec 26, 2021
Copy link
Member

@mini-min mini-min left a comment

Choose a reason for hiding this comment

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

변경 확인했습니다! 코리뷰 확인해주시고 머지해두될거 같아욥!

주신질문: cardListFetch 에서 offset nil 일 경우 "" 빈문자열로 대체했는데 이렇게 하면 괜찮죠?
답: 넵!

Comment on lines -134 to 131

private func setUI() {

}

func navigationBackSwipeMotion() {
Copy link
Member

Choose a reason for hiding this comment

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

어이쿠 정리까지 감사합니다

Comment on lines +104 to +114

func didScroll(verticalCardSwiperView: VerticalCardSwiperView) {
if verticalCardSwiperView.contentOffset.y > verticalCardSwiperView.contentSize.height - verticalCardSwiperView.bounds.height {
if isInfiniteScroll {
isInfiniteScroll = false
offset += 1
guard let userID = userID else { return }
cardListFetchWithAPI(userID: userID, isList: false, offset: offset)
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

👍🏻

Comment on lines +151 to +152
// FIXME: - 로그 확인용.
// print("✅cardListLookUpRequest", cardListLookUpRequest)
Copy link
Member

Choose a reason for hiding this comment

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

이제 FIXME 지워도 될것 같습니다!!

Copy link
Member Author

Choose a reason for hiding this comment

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

넵! 근데 지금 이게 뭔가 완벽한 로직은 아니라... 일단 남겨뒀습니당!
슬랙 예원이한테 질문한거랑 연관있어염

@@ -115,12 +142,16 @@ extension FrontViewController: VerticalCardSwiperDatasource {
// MARK: - Network
extension FrontViewController {
func cardListFetchWithAPI(userID: String, isList: Bool, offset: Int) {
CardAPI.shared.cardListFetch(userID: userID, isList: isList, offset: offset) { response in
CardAPI.shared.cardListFetch(userID: "nada2", isList: isList, offset: offset) { response in
Copy link
Member

Choose a reason for hiding this comment

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

일부러 nada2로 고정해두신가요 지금은??

Copy link
Member Author

Choose a reason for hiding this comment

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

넵 이슈파고 헤더 이제 동적으로 설정하면서 요것도 설정해둘게요! 굳굳!

Comment on lines -10 to -14
// MARK: - DataClass
struct CardClass: Codable {
let card: Card
}

Copy link
Member

Choose a reason for hiding this comment

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

확인이욥

@hyun99999 hyun99999 merged commit daa29cc into release1.0/2 Dec 26, 2021
@hyun99999 hyun99999 deleted the release1.0/#226 branch December 26, 2021 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 구현 Hyungyu 🐯 현규 교수님 작업 P1 / Priority High 우선순위 높음
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] 메인 무한스크롤 구현 및 data 모델 정리
2 participants