-
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.
- Loading branch information
Showing
16 changed files
with
225 additions
and
0 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
23 changes: 23 additions & 0 deletions
23
Youtube_Clone/Youtube_Clone/Resource/Assets.xcassets/icn_dismissBtn.imageset/Contents.json
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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "icn_dismissBtn.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "icn_dismissBtn@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "icn_dismissBtn@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+220 Bytes
...utube_Clone/Resource/Assets.xcassets/icn_dismissBtn.imageset/icn_dismissBtn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+305 Bytes
...be_Clone/Resource/Assets.xcassets/icn_dismissBtn.imageset/icn_dismissBtn@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+410 Bytes
...be_Clone/Resource/Assets.xcassets/icn_dismissBtn.imageset/icn_dismissBtn@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
Youtube_Clone/Youtube_Clone/Resource/Assets.xcassets/icn_expandBtn.imageset/Contents.json
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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "icn_expandBtn.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "icn_expandBtn@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "icn_expandBtn@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+228 Bytes
...Youtube_Clone/Resource/Assets.xcassets/icn_expandBtn.imageset/icn_expandBtn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+317 Bytes
...tube_Clone/Resource/Assets.xcassets/icn_expandBtn.imageset/icn_expandBtn@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+397 Bytes
...tube_Clone/Resource/Assets.xcassets/icn_expandBtn.imageset/icn_expandBtn@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
Youtube_Clone/Youtube_Clone/Resource/Assets.xcassets/wesoptiOSPart.imageset/Contents.json
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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "wesoptiOSPart.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "wesoptiOSPart@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "wesoptiOSPart@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+8.56 KB
...Youtube_Clone/Resource/Assets.xcassets/wesoptiOSPart.imageset/wesoptiOSPart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+19.6 KB
...tube_Clone/Resource/Assets.xcassets/wesoptiOSPart.imageset/wesoptiOSPart@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+32.9 KB
...tube_Clone/Resource/Assets.xcassets/wesoptiOSPart.imageset/wesoptiOSPart@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions
32
Youtube_Clone/Youtube_Clone/Resource/Storyboards/Detail/Detail.storyboard
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,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19162" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | ||
<device id="retina6_1" orientation="portrait" appearance="light"/> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19144"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="System colors in document resources" minToolsVersion="11.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<scenes> | ||
<!--DetailVC--> | ||
<scene sceneID="s0d-6b-0kx"> | ||
<objects> | ||
<viewController storyboardIdentifier="DetailVC" id="Y6W-OH-hqX" customClass="DetailVC" customModule="Youtube_Clone" customModuleProvider="target" sceneMemberID="viewController"> | ||
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc"> | ||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/> | ||
<color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||
</view> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="139" y="134"/> | ||
</scene> | ||
</scenes> | ||
<resources> | ||
<systemColor name="systemBackgroundColor"> | ||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
</systemColor> | ||
</resources> | ||
</document> |
8 changes: 8 additions & 0 deletions
8
Youtube_Clone/Youtube_Clone/Source/Models/HomeDataModel.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,8 @@ | ||
// | ||
// HomeDataModel.swift | ||
// Youtube_Clone | ||
// | ||
// Created by 박익범 on 2021/12/24. | ||
// | ||
|
||
import Foundation |
88 changes: 88 additions & 0 deletions
88
Youtube_Clone/Youtube_Clone/Source/VCs/Detail/DetailVC.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,88 @@ | ||
// | ||
// DetailVC.swift | ||
// Youtube_Clone | ||
// | ||
// Created by 박익범 on 2021/12/24. | ||
// | ||
|
||
import UIKit | ||
import SnapKit | ||
import Then | ||
|
||
class DetailVC: UIViewController { | ||
|
||
private let imageView = UIImageView().then{ | ||
$0.image = UIImage(named: "wesoptAndroidpart") | ||
} | ||
|
||
private let titleLabel = UILabel().then{ | ||
$0.font = UIFont.systemFont(ofSize: 15, weight: .regular) | ||
$0.textColor = UIColor.black | ||
$0.lineBreakMode = .byCharWrapping | ||
$0.numberOfLines = 2 | ||
} | ||
|
||
private let detailLabel = UILabel().then{ | ||
$0.font = UIFont.systemFont(ofSize: 13, weight: .regular) | ||
$0.textColor = UIColor.systemGray | ||
} | ||
private let backButton = UIButton().then{ | ||
$0.setBackgroundImage(UIImage(named: "icn_dismissBtn"), for: .normal) | ||
$0.addTarget(self, action: #selector(dismissButtonClicked(_:)), for: .touchUpInside) | ||
} | ||
private let expandButton = UIButton().then{ | ||
$0.setBackgroundImage(UIImage(named: "icn_expandBtn"), for: .normal) | ||
} | ||
|
||
|
||
func setData(title: String, detail: String, image: String){ | ||
titleLabel.text = title | ||
detailLabel.text = detail | ||
imageView.image = UIImage(named: image) | ||
} | ||
|
||
|
||
func setLayout(){ | ||
view.addsubViews([imageView, titleLabel, detailLabel, backButton, expandButton]) | ||
|
||
imageView.snp.makeConstraints{ | ||
$0.leading.trailing.equalToSuperview().offset(0) | ||
$0.top.equalToSuperview().offset(50) | ||
$0.height.equalTo(212) | ||
} | ||
backButton.snp.makeConstraints{ | ||
$0.leading.equalToSuperview().offset(0) | ||
$0.top.equalToSuperview().offset(50) | ||
$0.height.width.equalTo(48) | ||
} | ||
titleLabel.snp.makeConstraints{ | ||
$0.top.equalTo(imageView.snp.bottom).offset(12) | ||
$0.leading.equalToSuperview().offset(12) | ||
$0.width.equalTo(270) | ||
} | ||
expandButton.snp.makeConstraints{ | ||
$0.top.equalTo(imageView.snp.bottom).offset(12) | ||
$0.trailing.equalToSuperview().offset(-7) | ||
$0.width.height.equalTo(26) | ||
} | ||
detailLabel.snp.makeConstraints{ | ||
$0.top.equalTo(titleLabel.snp.bottom).offset(4) | ||
$0.leading.equalToSuperview().offset(12) | ||
$0.width.equalTo(270) | ||
} | ||
} | ||
|
||
@objc private func dismissButtonClicked(_ sender: UIButton){ | ||
self.dismiss(animated: true, completion: nil) | ||
} | ||
|
||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
setLayout() | ||
} | ||
|
||
|
||
|
||
|
||
} |