diff --git a/README.md b/README.md index d5e6b5c..79ded70 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ input.didSelectRefreshButton ### 2. **CollectionView 페이징 시 Cell의 Index와 Map Annotation이 동일한 Index로 선택 & 맵 중심 좌표 이동 로직 구현** -![Simulator Screen Recording - iPhone 14 Pro Max - 2023-10-27 at 22 47 28](https://github.com/kimkyuchul/Jumak/assets/25146374/36d78e70-b24e-46fe-8128-6ec31aebdc9c) +![Simulator Screen Recording - iPhone 14 Pro - 2023-11-02 at 19 06 37](https://github.com/kimkyuchul/Jumak/assets/25146374/1aa89fa0-12e7-4c78-b16c-c47be98ac41c) 위의 영상과 같이 하단 주막 정보 CollectionView를 페이징 시 Annotation과 맵 중심 좌표가 이동되어야 했다. @@ -128,6 +128,8 @@ section.visibleItemsInvalidationHandler = { [weak self] (visibleItems, offset, e ``` viewModel에선 페이징 시 visibleItems Index 값을 토대로 Annotation과 맵 중심 좌표가 이동되도록 구현했다. +[[iOS] Compositional Layout의 visibleitemsinvalidationhandler 활용](https://medium.com/@kyuchul2/ios-compositional-layout%EC%9D%98-visibleitemsinvalidationhandler-%ED%99%9C%EC%9A%A9-190cde90c933) + ```swift // didScrollStoreCollectionView == visibleItemsRelay input.didScrollStoreCollectionView @@ -145,6 +147,8 @@ input.didScrollStoreCollectionView ### 3. **Map의 Annotation 선택 시 CollectionView 스크롤 이벤트 때문에 여러 Annotation을 선택하고 오는 이슈** +![ezgif com-resize (2)](https://github.com/kimkyuchul/Jumak/assets/25146374/c02ec95c-60c3-4930-af28-972365cf3d14) + 2번 이슈에서 CollectionView 페이징 시 visibleItems Index를 방출하여 Cell의 선택된 Index와 Annotation을 동일하게 선택되게 하고, 해당 Index로 맵 중심 좌표를 이동시키게 구현했다. 반대로 Map의 Annotation 선택 시 해당 Annotation 인덱스로 CollectionView가 스크롤되어야 했는데 `selectItem` 애니메이션 때문에 맵 중심 좌표가 여러 마커를 들렸다 오는 이슈를 발견했다. @@ -267,13 +271,15 @@ override func bindReachability() { .disposed(by: disposeBag) } ``` +![ezgif com-resize (1)](https://github.com/kimkyuchul/Jumak/assets/25146374/25ded104-4a5f-4892-af96-6c1cae8e07fd) +![ezgif com-resize](https://github.com/kimkyuchul/Jumak/assets/25146374/6f53a2d7-a2c8-42fe-a234-cb70a389ac40) + # **🔥 기술적 도전** ### Clean Architecture -스크린샷 2023-11-02 오후 3 46 22 - +스크린샷 2023-11-09 오전 2 53 48 **Why** @@ -289,7 +295,7 @@ override func bindReachability() { ### MVVM + Input Output Patten -스크린샷 2023-11-02 오후 5 55 40 +스크린샷 2023-11-09 오전 2 58 26 **Why**