Skip to content

Commit

Permalink
βž•[ADD] HomeTapVC 생 (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
beansbin committed Dec 10, 2021
1 parent 89f34ce commit 966edbf
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,21 @@
</objects>
<point key="canvasLocation" x="3281" y="102"/>
</scene>
<!--Home TapVC-->
<scene sceneID="DtH-ND-fri">
<objects>
<viewController id="MYa-fh-6L1" customClass="HomeTapVC" customModule="_9th_assignmnet_YouTube" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" restorationIdentifier="HomeTapVC" id="l58-0I-iFL">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<viewLayoutGuide key="safeArea" id="1n4-oP-a9W"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Uqu-Il-Pli" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="4027" y="-564"/>
</scene>
<!--HomeVC-->
<scene sceneID="p50-DF-CQ9">
<objects>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,8 @@ class HomeTableViewCell: UITableViewCell {
// Configure the view for the selected state
}

@objc func tapView(gestureRecognizer: UIGestureRecognizer) {

}

}
29 changes: 29 additions & 0 deletions 29th-assignment-YouTube/Sources/HomeVC/HomeTapVC.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// HomeTapVC.swift
// 29th-assignmnet-YouTube
//
// Created by λ°•μ˜ˆλΉˆ on 2021/12/10.
//

import UIKit

class HomeTapVC: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
}


/*
// MARK: - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/

}
11 changes: 2 additions & 9 deletions 29th-assignment-YouTube/Sources/HomeVC/HomeVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class HomeVC: UIViewController, UIGestureRecognizerDelegate {
extension HomeVC: UITableViewDelegate {
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 306

}
}

Expand All @@ -73,19 +72,14 @@ 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(tapView(gestureRecognizer:)))

let tapRecorgnizer = UITapGestureRecognizer(target: self, action: #selector(cell.tapView(gestureRecognizer:)))
cell.mainImageView.addGestureRecognizer(tapRecorgnizer)

tapRecorgnizer.delegate = self


return cell
}

@objc func tapView(gestureRecognizer: UIGestureRecognizer) {
print("~$$")
}

}

// MARK: CollectionView
Expand All @@ -96,7 +90,6 @@ extension HomeVC: UICollectionViewDataSource {
} else {
return 6
}

}

func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
Expand Down
4 changes: 4 additions & 0 deletions 29th-assignmnet-YouTube.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
1501BB9D276382430084AAE4 /* HomeTapVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1501BB9C276382430084AAE4 /* HomeTapVC.swift */; };
15B2AE83272AF8ED00FFC5B2 /* UINavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15B2AE82272AF8ED00FFC5B2 /* UINavigationController.swift */; };
15B2AE85272AFA2900FFC5B2 /* UITextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15B2AE84272AFA2900FFC5B2 /* UITextField.swift */; };
15B2AE87272AFDD800FFC5B2 /* UIColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15B2AE86272AFDD800FFC5B2 /* UIColor.swift */; };
Expand Down Expand Up @@ -39,6 +40,7 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
1501BB9C276382430084AAE4 /* HomeTapVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeTapVC.swift; sourceTree = "<group>"; };
15B2AE82272AF8ED00FFC5B2 /* UINavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UINavigationController.swift; sourceTree = "<group>"; };
15B2AE84272AFA2900FFC5B2 /* UITextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITextField.swift; sourceTree = "<group>"; };
15B2AE86272AFDD800FFC5B2 /* UIColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIColor.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -248,6 +250,7 @@
15B2AE92272B24D700FFC5B2 /* HomeTableViewCell.swift */,
15B2AE93272B24D700FFC5B2 /* HomeTableViewCell.xib */,
15FF7ED8272B35E7004BE9D1 /* FilterCollectionViewCell.swift */,
1501BB9C276382430084AAE4 /* HomeTapVC.swift */,
);
path = HomeVC;
sourceTree = "<group>";
Expand Down Expand Up @@ -412,6 +415,7 @@
15B2AE89272B139300FFC5B2 /* StoryCollectionViewCell.swift in Sources */,
15B2AE8B272B17BB00FFC5B2 /* StoryDataModel.swift in Sources */,
15F3BA35271DCD7D00D51D4E /* HomeVC.swift in Sources */,
1501BB9D276382430084AAE4 /* HomeTapVC.swift in Sources */,
15B2AE83272AF8ED00FFC5B2 /* UINavigationController.swift in Sources */,
15F3BA37271DCDD500D51D4E /* ShortsVC.swift in Sources */,
15B2AE94272B24D700FFC5B2 /* HomeTableViewCell.swift in Sources */,
Expand Down

0 comments on commit 966edbf

Please sign in to comment.