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
17 changes: 17 additions & 0 deletions SeventhSeminar/SeventhSeminar/App/SeventhSeminarApp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// SeventhSeminarApp.swift
// SeventhSeminar
//
// Created by RAFA on 12/12/24.
//

import SwiftUI

@main
struct SeventhSeminarApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "tinted"
}
],
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions SeventhSeminar/SeventhSeminar/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
15 changes: 15 additions & 0 deletions SeventhSeminar/SeventhSeminar/Model/Application.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Application.swift
// SeventhSeminar
//
// Created by RAFA on 12/12/24.
//

import Foundation

struct Application: Identifiable {

let id = UUID()
let title: String
let description: String
}
43 changes: 43 additions & 0 deletions SeventhSeminar/SeventhSeminar/Model/SectionHeaderItem.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// SectionHeaderItem.swift
// SeventhSeminar
//
// Created by RAFA on 12/12/24.
//

import Foundation

struct SectionHeaderItem: Identifiable {

let id = UUID()
let title: String
let rightArrowIcon: String
let subtitle: String?
}

extension SectionHeaderItem {

static var essentialHeader: SectionHeaderItem {
return SectionHeaderItem(
title: "ν•„μˆ˜ 금육 μ•±",
rightArrowIcon: "chevron.right",
subtitle: "App Store 에디터가 직접 κ³¨λžμŠ΅λ‹ˆλ‹€"
)
}

static var paidRankingHeader: SectionHeaderItem {
return SectionHeaderItem(
title: "유료 μˆœμœ„",
rightArrowIcon: "chevron.right",
subtitle: nil
)
}

static var freeRankingHeader: SectionHeaderItem {
return SectionHeaderItem(
title: "무료 μˆœμœ„",
rightArrowIcon: "chevron.right",
subtitle: nil
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
43 changes: 43 additions & 0 deletions SeventhSeminar/SeventhSeminar/View/AppView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// AppView.swift
// SeventhSeminar
//
// Created by RAFA on 12/12/24.
//

import SwiftUI

struct AppView: View {

let app: Application

var body: some View {
HStack {
RoundedRectangle(cornerRadius: 12, style: .continuous)
.foregroundColor(Color.gray)
.frame(width: 50, height: 50)

VStack(alignment: .leading) {
Text(app.title)
.bold()

Text(app.description)
.font(.subheadline)
.foregroundColor(.secondary)
}

Spacer()

VStack {
ActionButton()
.padding(.bottom, 8)

InAppPurchasesLabel()
}
}
}
}

#Preview {
AppView(app: .init(title: "ν† μŠ€", description: "금육이 μ‰¬μ›Œμ§„λ‹€"))
}
26 changes: 26 additions & 0 deletions SeventhSeminar/SeventhSeminar/View/Components/ActionButton.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// ActionButton.swift
// SeventhSeminar
//
// Created by RAFA on 12/12/24.
//

import SwiftUI

struct ActionButton: View {

var title: String = "λ°›κΈ°"

var body: some View {
Button(title) {}
.font(Font.system(.caption).bold())
.padding(.horizontal, 24)
.padding(.vertical, 6)
.background(Color(UIColor.systemGray6))
.clipShape(Capsule())
}
}

#Preview {
ActionButton()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//
// InAppPurchasesLabel.swift
// SeventhSeminar
//
// Created by RAFA on 12/12/24.
//

import SwiftUI

struct InAppPurchasesLabel: View {

var body: some View {
Text("μ•± λ‚΄ κ΅¬μž…")
.foregroundStyle(.black.opacity(0.7))
.font(.system(size: 8))
}
}

#Preview {
InAppPurchasesLabel()
}
32 changes: 32 additions & 0 deletions SeventhSeminar/SeventhSeminar/View/ContentView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// ContentView.swift
// SeventhSeminar
//
// Created by RAFA on 12/12/24.
//

import SwiftUI

struct ContentView: View {

var body: some View {
NavigationStack {
List {
FeaturedView()
.listRowSeparator(.hidden)
EssentialView()
.listRowSeparator(.hidden)
PaidRankingView()
.listRowSeparator(.hidden)
FreeRankingView()
.listRowSeparator(.hidden)
}
.listStyle(.plain)
.navigationTitle("금육")
}
}
}

#Preview {
ContentView()
}
37 changes: 37 additions & 0 deletions SeventhSeminar/SeventhSeminar/View/EssentialView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// EssentialView.swift
// SeventhSeminar
//
// Created by RAFA on 12/12/24.
//

import SwiftUI

struct EssentialView: View {

@StateObject private var viewModel = EssentialViewModel()

var body: some View {
VStack(spacing: 0) {
SectionHeaderView(item: .essentialHeader)

TabView {
ForEach(viewModel.apps, id: \.title) { app in
VStack {
AppView(app: app)
AppView(app: app)
AppView(app: app)
}
}
.padding(.horizontal)
}
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
.tabViewStyle(PageTabViewStyle())
}
.frame(width: UIScreen.main.bounds.width, height: 245)
}
}

#Preview {
EssentialView()
}
43 changes: 43 additions & 0 deletions SeventhSeminar/SeventhSeminar/View/FeaturedView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// FeaturedView.swift
// SeventhSeminar
//
// Created by RAFA on 12/12/24.
//

import SwiftUI

struct FeaturedView: View {

var body: some View {
TabView {
ForEach(0..<5) { item in
VStack {
VStack(alignment: .leading) {
Text("UPDATE")
.bold()
.foregroundColor(.blue)
.font(.footnote)

Text("App title")
.font(.title3)

Text("Description")
.foregroundColor(.secondary)
}
.frame(maxWidth: .infinity, alignment: .leading)
RoundedRectangle(cornerRadius: 12, style: .continuous)
.foregroundColor(Color.gray)
}
}
.padding(.horizontal)
}
.frame(width: UIScreen.main.bounds.width, height: 300)
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
.padding(.bottom, 24)
}
}

#Preview {
FeaturedView()
}
37 changes: 37 additions & 0 deletions SeventhSeminar/SeventhSeminar/View/FreeRankingView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
//
// FreeRankingView.swift
// SeventhSeminar
//
// Created by RAFA on 12/12/24.
//

import SwiftUI

struct FreeRankingView: View {

@StateObject private var viewModel = RankingViewModel()

var body: some View {
VStack(spacing: 0) {
SectionHeaderView(item: .freeRankingHeader)

TabView {
ForEach(viewModel.freeApps, id: \.title) { app in
VStack {
AppView(app: app)
AppView(app: app)
AppView(app: app)
}
}
.padding(.horizontal)
}
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
.tabViewStyle(PageTabViewStyle())
}
.frame(width: UIScreen.main.bounds.width, height: 250)
}
}

#Preview {
FreeRankingView()
}
Loading