Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d86e722
[3차 세미나 과제] - 플로우 + 데이터 세팅, 에셋 추가
yeahh315 Apr 24, 2023
9798c6e
[3차 세미나 과제] - BaseVC 추가, 에셋 추가
yeahh315 Apr 25, 2023
0f76ee6
[3차 세미나 과제] - TableView 구현중 (Section O - Header, Footer X)
yeahh315 Apr 25, 2023
b5e73e2
[3차 세미나 과제] - Header 구현중
yeahh315 Apr 26, 2023
58b3064
[3차 세미나 과제] - 마이 페이지 구현 완료 (코드 수정 필요)
yeahh315 Apr 27, 2023
87fae86
[3차 세미나 과제] - delete 임시파일
yeahh315 Apr 27, 2023
56142c1
[3차 세미나 과제] - 기본 과제 구현 완료 (플로우까지)
yeahh315 Apr 27, 2023
dd636f2
[3차 세미나 과제] - 심화과제 에셋 추가
yeahh315 Apr 28, 2023
20a6715
[2차 세미나 과제] - 심화과제 구현중 (Paging, topbar 아직 X)
yeahh315 May 1, 2023
c670bb2
[2차 세미나 과제] - 심화과제 구현중 (Paging, topbar 아직 X)
yeahh315 May 1, 2023
61db677
[2차 세미나 과제] - 심화과제 구현중 (Paging, topbar 아직 X)
yeahh315 May 1, 2023
6dd3133
[3차 세미나 과제] - 심화 과제 (paging 구현 - 오류 존재)
yeahh315 May 2, 2023
9d0867c
[3차 세미나 과제] - paging 구현 완료
yeahh315 May 2, 2023
5e1064e
[3차 세미나 과제] - 구조 변경
yeahh315 May 2, 2023
da7231f
[3차 세미나 과제] - 심화과제 PagingVC 구현중
yeahh315 May 3, 2023
444f26b
[3차 세미나 과제] - 심화과제 PagingVC 구현중
yeahh315 May 3, 2023
2fa51fb
[3차 세미나 과제] - 폴더링 수정
yeahh315 May 3, 2023
8a7e084
[3차 세미나 과제] - 심화과제 구현 완료
yeahh315 May 3, 2023
e492624
[3차 세미나 과제] - 심화과제 구현 완료 (코드 정리 필요)
yeahh315 May 3, 2023
8ebe930
[3차 세미나 과제] - 코드 수정
yeahh315 May 4, 2023
5da2836
[3차 세미나 과제] - 코드 수정 (함수로 따로 빼줌)
yeahh315 May 4, 2023
9b37a2c
[3차 세미나 과제] - 사소한 수정사항
yeahh315 May 11, 2023
cdce2f4
[3차 세미나 과제] - 불필요한 파일 삭제
yeahh315 May 11, 2023
1c5cc6d
[4주차 과제] - API 연결 및 영화 제목 불러오기
yeahh315 May 12, 2023
46d65f5
[4차 세미나 과제] - 이미지 불러오기 구현
yeahh315 May 12, 2023
73ad83b
[4차 세미나 과제] - 불필요한 파일 삭제
yeahh315 May 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
332 changes: 318 additions & 14 deletions GO_SOPT_Seminar_Assignment.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,13 @@
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>6B5944F829F5BE000087A4C3</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
18 changes: 13 additions & 5 deletions GO_SOPT_Seminar_Assignment/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
<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>
Expand All @@ -11,15 +14,20 @@
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
9 changes: 9 additions & 0 deletions GO_SOPT_Seminar_Assignment/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>Personal_Key</key>
<string>$(Personal_Key)</string>
<key>CFBundleName</key>
<string></string>
<key>UIAppFonts</key>
<array>
<string>Pretendard-SemiBold.ttf</string>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//
// Contents.swift
// GO_SOPT_Seminar_Assignment
//
// Created by 김다예 on 2023/04/29.
//

import UIKit

struct Contents {
var image: UIImage? = nil
var imageLink: String? = nil
var name: String? = nil
var subName: String? = nil
let sectionNum: Int
}

extension Contents {
static func dummy() -> [[Contents]] {
let contents = [[Contents(image: .main1, sectionNum: 0),
Contents(image: .main2, sectionNum: 0),
Contents(image: .main3, sectionNum: 0),
Contents(image: .main4, sectionNum: 0)],
[],
[Contents(image: .banner1, sectionNum: 3),
Contents(image: .banner2, sectionNum: 3),
Contents(image: .banner3, sectionNum: 3)],
[Contents(image: .live1, name: "tvN Show", subName: "신서유기5 10화\n24.3%", sectionNum: 4),
Contents(image: .live2, name: "JTBC", subName: "JTBC 뉴스\n10.7%", sectionNum: 4),
Contents(image: .live3, name: "tvN", subName: "부산 촌놈 3화\n7.4%", sectionNum: 4)],
[Contents(image: .paramount1, name: "그리스: 라이즈 오브 핑크 레이디스", sectionNum: 5),
Contents(image: .paramount2, name: "옐로우재킷 시즌2", sectionNum: 5),
Contents(image: .paramount3, name: "래빗홀", sectionNum: 5),
Contents(image: .paramount4, name: "메이어 오브 킹스타운", sectionNum: 5),
Contents(image: .paramount5, name: "1923", sectionNum: 5)]]

return contents
}

static func sectionName() -> [String] {
return ["", "티빙에서 꼭 봐야하는 콘텐츠", "", "인기 LIVE 채널", "파라마운트+의 따끈한 신작"]
}

static func sectionLayout() -> [String] {
return ["Header", "Normal", "Banner", "Live", "Normal"]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
//
// MainViewSection.swift
// GO_SOPT_Seminar_Assignment
//
// Created by 김다예 on 2023/05/01.
//

import UIKit

@frozen
enum ContentsSectionLayout: String {

case header = "Header"
case normal = "Normal"
case live = "Live"
case banner = "Banner"

var itemSize: NSCollectionLayoutSize {
switch self {
case .header:
return NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0) ,heightDimension: .absolute(520))
case .normal:
return NSCollectionLayoutSize(widthDimension: .absolute(98) ,heightDimension: .absolute(160))
case .live:
return NSCollectionLayoutSize(widthDimension: .absolute(160) ,heightDimension: .absolute(140))
case .banner:
return NSCollectionLayoutSize(widthDimension: .absolute(300) ,heightDimension: .absolute(100))
}
}

var interGroupSpacing: CGFloat {
switch self {
case .header:
return 0
default:
return 10
}
}

var orthogonalScrollinBehavior: UICollectionLayoutSectionOrthogonalScrollingBehavior {
switch self {
case .header:
return .groupPaging
default:
return .continuous
}
}

var header: [NSCollectionLayoutBoundarySupplementaryItem] {
switch self {
case .normal, .live:
let headerSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .absolute(30))
let header = NSCollectionLayoutBoundarySupplementaryItem(layoutSize: headerSize, elementKind: UICollectionView.elementKindSectionHeader, alignment: .top)
return [header]
default:
return []
}
}

var footer: [NSCollectionLayoutBoundarySupplementaryItem] {
switch self {
case .header:
let footerSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .absolute(20))
let footer = NSCollectionLayoutBoundarySupplementaryItem(layoutSize: footerSize, elementKind: UICollectionView.elementKindSectionFooter, alignment: .bottom)
return [footer]
default:
return []
}
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// TvingButton.swift
// GO_SOPT_Seminar_Assignment
//
// Created by 김다예 on 2023/04/26.
//

import UIKit

import SnapKit
import Then

class CustomTvingButton: UIButton {

override init(frame: CGRect) {
super.init(frame: frame)

style()
setLayout()
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

func style() {
self.setTitleColor(.tvingGray2, for: .normal)
self.titleLabel?.textAlignment = .center
self.layer.borderColor = UIColor.tvingGray4.cgColor
self.layer.borderWidth = 1
self.layer.cornerRadius = 3
}

func setLayout() {

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
//
// ContentsCollectionViewCell.swift
// GO_SOPT_Seminar_Assignment
//
// Created by 김다예 on 2023/04/29.
//

import UIKit

import Kingfisher

class MainViewContentsCell: UICollectionViewCell {

static let identifier = "ContentsCell"

private let contentsStackView = UIStackView()
private let contentsImg = UIImageView()
private let contentsName = UILabel()
private let contentsSubName = UILabel()

var pageIndicatorNum: Int = 0

override init(frame: CGRect) {
super.init(frame: frame)

setStyle()
setHierarchy()
setLayout()
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

}

extension MainViewContentsCell {

func setStyle() {
contentsStackView.do {
$0.axis = .vertical
$0.distribution = .fill
}
contentsImg.do {
$0.contentMode = .scaleAspectFit
}
contentsName.do {
$0.font = .tvingMedium(ofSize: 12)
$0.textColor = .tvingGray2
}
contentsSubName.do {
$0.font = .tvingRegular(ofSize: 10)
$0.textColor = .tvingGray2
$0.numberOfLines = 2
}
}

func setHierarchy() {
contentView.addSubviews(contentsStackView)
contentsStackView.addArrangedSubviews(contentsImg,
contentsName,
contentsSubName)
}

func setLayout() {
contentsStackView.snp.makeConstraints {
$0.edges.equalToSuperview()
}
contentsImg.snp.makeConstraints {
$0.leading.trailing.equalToSuperview()
}
contentsName.snp.makeConstraints {
$0.height.equalTo(20)
$0.leading.trailing.equalToSuperview()
}
contentsSubName.snp.makeConstraints {
$0.height.equalTo(25)
$0.leading.trailing.equalToSuperview()
}
}

func configureCell(_ contents: Contents) {

if let img = contents.image {
contentsImg.image = img
}
if let imgLink = contents.imageLink {
contentsImg.kf.setImage(with: URL(string: imgLink))
}
contentsName.text = contents.name
contentsSubName.text = contents.subName

if (contentsName.text == nil) {
contentsName.isHidden = true
} else {
contentsName.isHidden = false
}
if (contentsSubName.text == nil) {
contentsSubName.isHidden = true
} else {
contentsSubName.isHidden = false
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// MypageMenu.swift
// GO_SOPT_Seminar_Assignment
//
// Created by 김다예 on 2023/04/26.
//

import UIKit

struct MyPageMenu {
let menuName: String
}

extension MyPageMenu {

static func dummy() -> [[MyPageMenu]] {
return [[MyPageMenu(menuName: "이용권"),
MyPageMenu(menuName: "1:1 문의내역"),
MyPageMenu(menuName: "예약알림"),
MyPageMenu(menuName: "회원정보 수정"),
MyPageMenu(menuName: "프로모션 정보 수신 동의")],
[MyPageMenu(menuName: "공지사항"),
MyPageMenu(menuName: "이벤트"),
MyPageMenu(menuName: "고객센터"),
MyPageMenu(menuName: "티빙 알아보기")]]
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// TvingUser.swift
// GO_SOPT_Seminar_Assignment
//
// Created by 김다예 on 2023/04/28.
//

import Foundation

class TvingUser {

var id: String?
var password: String?
var nickName: String?

func getNickNameOrId() -> String {
if let nickName = self.nickName {
return nickName
} else {
guard let id = self.id?.components(separatedBy: "@").first else { return "" }
return id
}
}
}
Loading