Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kimkyuchul committed Nov 9, 2023
1 parent 9d7ffc5 commit 89ab54b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ output.selectedMarkerIndex
.disposed(by: disposeBag)
```
스크롤(페이징) 이벤트 input 옵저버블에 `debounce` 를 걸었다. `debounce`는 일정 시간동안 새로운 이벤트가 없을 때에만 이벤트를 전달하며, 중간에 들어오는 이벤트들을 무시한다.

이를 활용하여 `selectItem`의 스크롤 애니메이션 때 들어오는 visibleItems Index를 무시하고, 스크롤 애니메이션이 끝나고 마지막에 들어온 visibleItems Index 값만 받아서 선택한 Annotation의 맵 중심 좌표로 이동시킬 수 있었다.

```swift
Expand Down

0 comments on commit 89ab54b

Please sign in to comment.