Skip to content

Commit

Permalink
[#52] message 선택 시 detail 화면 전환
Browse files Browse the repository at this point in the history
  • Loading branch information
meenyweeny committed Jul 15, 2022
1 parent 2d7fae5 commit 83be432
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ final class CheckMessageViewController: UIViewController {
}

private func setCollectionView() {
collectionView.delegate = self
registerXib()
setDataSource()
collectionView.setCollectionViewLayout(createLayout(), animated: true)
Expand Down Expand Up @@ -106,6 +107,17 @@ final class CheckMessageViewController: UIViewController {
}
}

// MARK: - UICollectionViewDelegate

extension CheckMessageViewController: UICollectionViewDelegate {
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard let messageDetail = UIStoryboard(name: Constant.Storyboard.CheckMessageDetail, bundle: nil)
.instantiateViewController(withIdentifier: Constant.ViewController.CheckMessageDetail) as? CheckMessageDetailViewController else { return }
messageDetail.modalPresentationStyle = .overFullScreen
present(messageDetail, animated: false, completion: nil)
}
}

// MARK: - Component UI Setting functions

extension CheckMessageViewController {
Expand Down

0 comments on commit 83be432

Please sign in to comment.