Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
472D2DAE2DCC3B86006DEFD7 /* Secrets.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 472D2DA12DCC3B86006DEFD7 /* Secrets.xcconfig */; };
4747F1FB2DB3CB3100B65239 /* Then in Frameworks */ = {isa = PBXBuildFile; productRef = 4747F1FA2DB3CB3100B65239 /* Then */; };
4747F2032DB3CCA600B65239 /* SnapKit in Frameworks */ = {isa = PBXBuildFile; productRef = 4747F2022DB3CCA600B65239 /* SnapKit */; };
47CE27272DE58B9C00C123BF /* Secrets.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 47CE27262DE58B9C00C123BF /* Secrets.xcconfig */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -23,9 +23,9 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
472D2DA12DCC3B86006DEFD7 /* Secrets.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Secrets.xcconfig; sourceTree = "<group>"; };
475FC9702DAFE00C000045E9 /* ATSOPT36_Assignment.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ATSOPT36_Assignment.app; sourceTree = BUILT_PRODUCTS_DIR; };
47662D532DC7690B000803B5 /* ATSOPT36_AssignmentTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ATSOPT36_AssignmentTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
47CE27262DE58B9C00C123BF /* Secrets.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Secrets.xcconfig; sourceTree = "<group>"; };
47E677B82DCBAA7900E3B8E5 /* Secrets.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Secrets.xcconfig; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -86,11 +86,11 @@
475FC9672DAFE00C000045E9 = {
isa = PBXGroup;
children = (
47CE27262DE58B9C00C123BF /* Secrets.xcconfig */,
475FC9722DAFE00C000045E9 /* ATSOPT36_Assignment */,
47662D542DC7690B000803B5 /* ATSOPT36_AssignmentTests */,
475FC9712DAFE00C000045E9 /* Products */,
472D2D542DCC3B86006DEFD7 /* Recovered References */,
472D2DA12DCC3B86006DEFD7 /* Secrets.xcconfig */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -201,7 +201,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
472D2DAE2DCC3B86006DEFD7 /* Secrets.xcconfig in Resources */,
47CE27272DE58B9C00C123BF /* Secrets.xcconfig in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import UIKit
import SwiftUI

class SceneDelegate: UIResponder, UIWindowSceneDelegate {

Expand Down Expand Up @@ -62,7 +63,9 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
extension SceneDelegate: LoginViewControllerDelegate {
func loginFlowDidComplete() {
let mainViewController = MainViewController()
let navigationController = UINavigationController(rootViewController: mainViewController)
let hostingView = UIHostingController(rootView: SwiftUIView())
let navigationController = UINavigationController(rootViewController: hostingView)

window?.rootViewController = navigationController
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import UIKit

struct ContentModel {
struct ContentModel: Hashable {
let title: String
let description: String
let rating: Double
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import UIKit

enum MockData {
enum MockData: Hashable {
case thumbnail
case banner
case todayTving([ContentModel])
Comment on lines +10 to 13

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 이렇게 MockData를 enum으로 관리하는 것도 좋아 보이네요! 배워갑니다

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
//
// FooterView.swift
// ATSOPT36_Assignment
//
// Created by 권석기 on 5/29/25.
//

import SwiftUI

struct FooterView: View {
var body: some View {
VStack(alignment: .leading, spacing: 13) {
HStack(spacing:0) {
Text("공지")
.foregroundStyle(.gray)
Text("티빙 계정 공유 정책 추가 안내")
.foregroundStyle(.gray)
.fontWeight(.semibold)
.padding(.leading, 8)
Spacer()
Image(.moveButton)
}
.padding(16)
.background(.gray5)
.cornerRadius(5)

VStack(spacing: 0) {
HStack {
Text("고객문의")
.font(.caption)
.foregroundStyle(.gray)
Circle()
.foregroundStyle(.gray)
.frame(width: 2, height: 2)
Text("이용약관")
.font(.caption)
.foregroundStyle(.gray)
Circle()
.foregroundStyle(.gray)
.frame(width: 2, height: 2)
}

HStack {
Text("사업자정보")
.font(.caption)
.foregroundStyle(.gray)
Circle()
.foregroundStyle(.gray)
.frame(width: 2, height: 2)
Text("인재채용")
.font(.caption)
.foregroundStyle(.gray)
}
}
}
.padding(.top, 30)
.padding(.horizontal, 15)
}
}

#Preview {
FooterView()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// HeaderView.swift
// ATSOPT36_Assignment
//
// Created by 권석기 on 5/29/25.
//

import SwiftUI

struct HeaderView: View {
var body: some View {
HStack {
Image(.tvingLogo)
Spacer()
Image(.search)
Image(.tvingLogo2)
}
.padding(.horizontal, 11)
}
}

#Preview {
HeaderView()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//
// KimGaHyunBestListView.swift
// ATSOPT36_Assignment
//
// Created by 권석기 on 5/29/25.
//

import SwiftUI

struct KimGaHyunBestListView: View {
let items: [ContentModel]
Comment on lines +9 to +11

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ아 진짜 웃기다 ㅋㅋㅋㅋㅋ @mcrkgus

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 아 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ

var body: some View {
VStack(spacing: 13) {
HStack {
Text("김가현PD의 인생작 TOP 5")
.foregroundStyle(.white)
.fontWeight(.semibold)
Spacer()
}
.padding(.leading, 15)
.padding(.vertical, 10)
ScrollView(.horizontal) {
HStack(alignment: .bottom, spacing: 8) {
ForEach(Array(items.enumerated()), id: \.self.offset) { offset, item in
Image(uiImage: item.thumbnail)
.resizable()
.frame(width: 160, height: 90)
.cornerRadius(3)
}
}
.padding(.leading, 15)
}
}
}
}

#Preview {
KimGaHyunBestListView(items: [])
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//
// LivePopularListView.swift
// ATSOPT36_Assignment
//
// Created by 권석기 on 5/29/25.
//

import SwiftUI

struct LivePopularListView: View {
let items: [ContentModel]
var body: some View {
VStack(spacing: 13) {
HStack {
Text("실시간 인기 LIVE")
.foregroundStyle(.white)
.fontWeight(.semibold)
Spacer()
}
.padding(.leading, 15)
.padding(.vertical, 10)
ScrollView(.horizontal) {
HStack(spacing: 8) {
ForEach(Array(items.enumerated()), id: \.self.offset) { offset, item in
VStack(spacing: 10) {
Image(uiImage: item.thumbnail)
.resizable()
.frame(width: 160, height: 80)
HStack(alignment: .top) {
Image("number\(offset + 1)")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 23)
VStack(alignment: .leading) {
Text(item.title)
.foregroundStyle(.white)
Text(item.description)
.foregroundStyle(.gray)
.font(.caption)
Text("\(item.rating)%")
.foregroundStyle(.gray)
.font(.caption)
}
}
}
.frame(maxWidth: 160)
Comment on lines +25 to +46

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요런 부분은 따로 컴포넌트로 분리할 수 있어 보이는데, 하지 않으신 이유가 있는지 궁금해요!!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 뎁스가 깊어지는 것 같아서 따로 Cell 등 ... 으로 분리하는 것도 좋아보여요 !
분리하지 않으신 이유는 저도 궁금합니다 ~ㅎㅎ

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런 경우에 보통은 무조건 분리를 합니다.!! 이번에 시간이슈가 조금 있어서
추후에 리뷰 반영하도록 하겠습니다!!

}
}
.padding(.leading, 15)
}
}
}
}

#Preview {
LivePopularListView(items: [])
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// MenuView.swift
// ATSOPT36_Assignment
//
// Created by 권석기 on 5/29/25.
//

import SwiftUI

struct MenuView: View {
let items: [String]
var body: some View {
HStack {
Spacer()
ForEach(items, id: \.self) { item in
Text(item)
.foregroundStyle(.white)
Spacer()
}
}
.padding(.vertical, 16)
}
}

#Preview {
MenuView(items: [])
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//
// MovieListView.swift
// ATSOPT36_Assignment
//
// Created by 권석기 on 5/29/25.
//

import SwiftUI

struct MovieListView: View {
let items: [ContentModel]
let title: String
var isShowRanking = false

var body: some View {
VStack(spacing: 13) {
HStack {
Text(title)
.foregroundStyle(.white)
.fontWeight(.semibold)
Spacer()
}
.padding(.leading, 15)
.padding(.vertical, 10)
ScrollView(.horizontal) {
HStack(alignment: .bottom, spacing: 8) {
ForEach(Array(items.enumerated()), id: \.self.offset) { offset, item in
if isShowRanking {
Image("number\(offset+1)")
}
Comment on lines +28 to +30

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isShowRanking 이 어떤 역할을 하는 변수인가요!! 궁금합니다ㅏ

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이탤릭체로 랭킹을 보여주는지 여부입니다!
리스트의 디자인이나 간격이 동일하기에 간단하게 isShowRanking으로 상황에따라 랭킹 숨김여부를 처리했어요!

Image(uiImage: item.thumbnail)
.resizable()
.frame(width: 98, height: 146)
.cornerRadius(3)
}
}
.padding(.leading, 15)
}
}
}
}

#Preview {
MovieListView(items: [], title: "")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// SportListView.swift
// ATSOPT36_Assignment
//
// Created by 권석기 on 5/29/25.
//

import SwiftUI

struct SportListView: View {
let items: [ContentModel]
var body: some View {
ScrollView(.horizontal) {
HStack {
ForEach(items, id: \.self) {
Image(uiImage: $0.thumbnail)
.padding(.vertical, 6)
.padding(.horizontal, 10)
.background(.gray5)
.cornerRadius(3)
}
}
.padding(.leading, 15)
}
}
}

#Preview {
SportListView(items: [])
}
Loading