Skip to content

Commit

Permalink
[feat] HomeViewModel에서 구현한 기능 바인딩
Browse files Browse the repository at this point in the history
  • Loading branch information
wickedRun committed Dec 8, 2022
1 parent 5a32b98 commit 402a799
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,17 @@ final class HomeViewController: UIViewController {
.compactMap({ $0?.toFormat })
.bind(to: calendarView.yearMonthLabel.rx.text)
.disposed(by: disposableBag)

output
.selectedDateCompletion
.drive(onNext: { [weak self] dailyQuestCompletion in
guard let dailyQuestCompletion else { return }

let indexPath = self?.calendarView.dataSource.indexPath(for: dailyQuestCompletion)
self?.calendarView.monthCollectionView.selectItem(at: indexPath, animated: true, scrollPosition: .centeredHorizontally)
})
.disposed(by: disposableBag)

}

private func bindToQuestHeaderButton() {
Expand Down

0 comments on commit 402a799

Please sign in to comment.