diff --git a/29th-assignment-YouTube/Resources/Storyboards/Base.lproj/Main.storyboard b/29th-assignment-YouTube/Resources/Storyboards/Base.lproj/Main.storyboard index c6f8d35..8d0bc77 100644 --- a/29th-assignment-YouTube/Resources/Storyboards/Base.lproj/Main.storyboard +++ b/29th-assignment-YouTube/Resources/Storyboards/Base.lproj/Main.storyboard @@ -381,35 +381,44 @@ + + + + - - - + diff --git a/29th-assignment-YouTube/Sources/HomeVC/HomeTableViewCell.swift b/29th-assignment-YouTube/Sources/HomeVC/HomeTableViewCell.swift index 00db193..4ac90fd 100644 --- a/29th-assignment-YouTube/Sources/HomeVC/HomeTableViewCell.swift +++ b/29th-assignment-YouTube/Sources/HomeVC/HomeTableViewCell.swift @@ -30,13 +30,8 @@ class HomeTableViewCell: UITableViewCell { // Configure the view for the selected state } - @objc func tapView(gestureRecognizer: UIGestureRecognizer) { -// guard let nextVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: HomeTapVC.identifier) as? HomeTapVC else { return } -// -// nextVC.imgView = self.mainImageView -// nextVC.titleLabel = self.titleLabel -// nextVC.subtitleLabel = self.subtitleLabel - print("##") - } + + + } diff --git a/29th-assignment-YouTube/Sources/HomeVC/HomeTapVC.swift b/29th-assignment-YouTube/Sources/HomeVC/HomeTapVC.swift index a11ac89..85535c6 100644 --- a/29th-assignment-YouTube/Sources/HomeVC/HomeTapVC.swift +++ b/29th-assignment-YouTube/Sources/HomeVC/HomeTapVC.swift @@ -19,4 +19,7 @@ class HomeTapVC: UIViewController { // Do any additional setup after loading the view. } + @IBAction func touchUpToBack(_ sender: Any) { + self.dismiss(animated: true, completion: nil) + } } diff --git a/29th-assignment-YouTube/Sources/HomeVC/HomeVC.swift b/29th-assignment-YouTube/Sources/HomeVC/HomeVC.swift index 60f75cc..180e056 100644 --- a/29th-assignment-YouTube/Sources/HomeVC/HomeVC.swift +++ b/29th-assignment-YouTube/Sources/HomeVC/HomeVC.swift @@ -72,13 +72,25 @@ extension HomeVC: UITableViewDataSource { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { guard let cell = tableView.dequeueReusableCell(withIdentifier: HomeTableViewCell.identifier) as? HomeTableViewCell else {return UITableViewCell()} - let tapRecorgnizer = UITapGestureRecognizer(target: self, action: #selector(cell.tapView(gestureRecognizer:))) + let tapRecorgnizer = UITapGestureRecognizer(target: self, action: #selector(tapView(gestureRecognizer:))) cell.mainImageView.addGestureRecognizer(tapRecorgnizer) tapRecorgnizer.delegate = self return cell } + @objc func tapView(gestureRecognizer: UIGestureRecognizer) { + guard let nextVC = self.storyboard?.instantiateViewController(withIdentifier: HomeTapVC.identifier) as? HomeTapVC else { return } + + nextVC.modalPresentationStyle = .fullScreen + + present(nextVC, animated: true) { + nextVC.imgView.image = UIImage(named: "soptIOS") + nextVC.titleLabel.text = "1차 세미나 : iOS 컴포넌트 이해, XCode 기본 사용법, View 화면 전환" + nextVC.subtitleLabel.text = "WE SOPT ・조회수 100만회 ・ 3주 전" + + } + } }