Skip to content

Commit

Permalink
feat: HomeViewController의 Cell과 BookViewController 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
k2645 committed Nov 29, 2024
1 parent b3d7d16 commit 178ca5b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ extension HomeViewController: UICollectionViewDelegate {
_ collectionView: UICollectionView,
didSelectItemAt indexPath: IndexPath
) {
// TODO: 책 펼치기 로직
let bookID = viewModel.currentBookCovers[indexPath.row].id
guard let bookViewModelFactory = try? DIContainer.shared.resolve(BookViewModelFactory.self) else { return }
let bookViewModel = bookViewModelFactory.make(bookID: bookID)
let bookViewController = BookViewController(viewModel: bookViewModel)
navigationController?.pushViewController(bookViewController, animated: true)
}

public func scrollViewDidScroll(_ scrollView: UIScrollView) {
Expand Down

0 comments on commit 178ca5b

Please sign in to comment.