-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨[FEAT] tapGesture 이용하여 화면전환 + dismiss구현 (#16)
- Loading branch information
Showing
5 changed files
with
149 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
Youtube-Clone/Youtube-Clone/Source/Scene/MainTab/HomeTab/HomeTabDetailVC.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// HomeTabDetailVC.swift | ||
// Youtube-Clone | ||
// | ||
// Created by 김혜수 on 2021/12/24. | ||
// | ||
|
||
import UIKit | ||
|
||
class HomeTabDetailVC: UIViewController { | ||
|
||
var videoData: VideoData? | ||
|
||
@IBOutlet weak var imageView: UIImageView! | ||
@IBOutlet weak var titleLabel: UILabel! | ||
@IBOutlet weak var detailLabel: UILabel! | ||
|
||
// MARK: - VC LifeCycle | ||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
setData() | ||
} | ||
|
||
func setData() { | ||
guard let data = videoData else { return } | ||
imageView.image = UIImage(named: data.thumnail)! | ||
titleLabel.text = data.title | ||
detailLabel.text = "조회수 \(data.watch)회 • \(data.upload)" | ||
} | ||
|
||
@IBAction func closeButtonClicked(_ sender: Any) { | ||
self.dismiss(animated: true, completion: nil) | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters