-
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] #169 - 캐릭터 상세 뷰 API 연결 #171
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.
서버연결하시느라 고생하셨습니다!
스크롤 시 백버튼이 사라지지 않는 것은 커스텀 버튼 hidden 로직을 따로 구현해주지 않아서인데, 디자인분들과 상의해서 스크롤 시 hidden 처리를 할 것인지, 혹은 스크롤 영역을 조절할 것인지 회의 때 논의해보면 좋을 것 같아요~~!
Offroad-iOS/Offroad-iOS/Network/CharacterDetail/DTO/Response/CharacterMotionResponseDTO.swift
Outdated
Show resolved
Hide resolved
Offroad-iOS/Offroad-iOS/Presentation/MyPage/CharacterList/Cell/CharacterDetailCell.swift
Outdated
Show resolved
Hide resolved
...oad-iOS/Presentation/MyPage/CharacterList/ViewController/CharacterDetailViewController.swift
Outdated
Show resolved
Hide resolved
...oad-iOS/Presentation/MyPage/CharacterList/ViewController/CharacterDetailViewController.swift
Show resolved
Hide resolved
...oad-iOS/Presentation/MyPage/CharacterList/ViewController/CharacterDetailViewController.swift
Outdated
Show resolved
Hide resolved
...oad-iOS/Presentation/MyPage/CharacterList/ViewController/CharacterDetailViewController.swift
Outdated
Show resolved
Hide resolved
...oad-iOS/Presentation/MyPage/CharacterList/ViewController/CharacterDetailViewController.swift
Outdated
Show resolved
Hide resolved
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.
캐릭터 상세 뷰에서 API가 동작하는 점 확인했습니다 😁
아직 캐릭터 선택 뷰는 구현하지 않은 상황인 거죠?
추후 구현하면 더 완벽해질 것 같습니다!
수고 많으셨습니다! 👍
다만 브랜치(이슈)와 관련 없는 목적의 코드가 너무 많습니다.
대표적으로, 뷰의 코너에 곡률 반경을 설정하는 메서드인 roundCorners
메서드를 적용하는 코드만 10개가 넘습니다.
확장 구현한 메서드를 적극적으로 사용하여 반복된 코드를 줄이는 점 좋습니다!
그러나, 브랜치의 이름을 다시 확인해보시면 알겠지만 해당 브랜치는 "캐릭터 상세 뷰의 API를 연결"하는 것이 주 목적인 브랜치입니다.
리뷰하는 사람들의 입장에서, 브랜치의 목적을 벗어난 코드가 많아질 경우 다소 헷갈릴 수 있습니다.
(한 두 개 정도여서 새 브랜치를 생성하기 애매한 경우는 괜찮지만 그 수가 많아질 경우...)
이러한 코드가 많아질 경우, 관련한 이슈 및 브랜치를 별도로 생성하여 코드를 수정하면 훨씬 깔끔하고 효율적인 작업이 가능할 것 같다는 의견 남깁니다! :)
🌴 작업한 브랜치
✅ 작업한 내용
고민되었던 부분
캐릭터 모션 목록 API에 셀의 mainColor와 subColor가 있었다면 CharacterDetailCell에 바로 값을 받아올 수 있었는데, 캐릭터 상세 정보 조회 API에 있어서 고민이 됐다.
CharacterViewController의 getCharacterDetailInfo() 함수에서 서버에서 넘겨주는 값을 가져오는데, 셀의 mainColor, subColor를
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {}
안에서 configureCellColor 함수를 통해 CharacterDetailCell로 넘겨주고 싶었다.해결 방법
따라서 characterMainColorCode, characterSubColorCode 전역 변수를 생성하고 getCharacterDetailInfo() 에서 서버에서 받아온 값을 전역 변수에 넣은 후 CharacterDetailCell로 넘겨주었다.
❗️PR Point
🚨서버의 모션 이미지 링크가 다 빈 링크여서 이미지를 불러올 수가 없다. 로그 찍었을 때 이미지 링크는 제대로 불러와진다.
질문
왜 스크롤 내리면 네비게이션 바가 계속 있지..?
📸 스크린샷