Skip to content

Commit

Permalink
Merge pull request #17 from Code-Drop-DevAcademy/Design/#16
Browse files Browse the repository at this point in the history
Design #16 기존 UIUX 추가
  • Loading branch information
darongzzang authored Jun 14, 2024
2 parents 5f441c4 + 7c4d4ca commit 735cc1e
Show file tree
Hide file tree
Showing 8 changed files with 156 additions and 1 deletion.
Binary file added .DS_Store
Binary file not shown.
Binary file added Code Drop_Team 11/.DS_Store
Binary file not shown.
20 changes: 20 additions & 0 deletions Code Drop_Team 11/Code Drop_Team 11.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
6B7453252C1CB36C000C2955 /* Code_Drop_Team_11UITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B7453242C1CB36C000C2955 /* Code_Drop_Team_11UITestsLaunchTests.swift */; };
6B7453352C1CC7FC000C2955 /* HealthKitViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B7453342C1CC7FC000C2955 /* HealthKitViewModel.swift */; };
6B7453372C1CC816000C2955 /* HealthKitManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B7453362C1CC816000C2955 /* HealthKitManager.swift */; };
6B7453442C1D062B000C2955 /* DetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B7453402C1D062B000C2955 /* DetailView.swift */; };
6B7453452C1D062B000C2955 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B7453412C1D062B000C2955 /* HomeView.swift */; };
6B7453462C1D062B000C2955 /* ListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B7453422C1D062B000C2955 /* ListView.swift */; };
89937B5C2C1CC06D00ED70E3 /* NotificationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89937B5B2C1CC06D00ED70E3 /* NotificationManager.swift */; };
89937B5F2C1CCED800ED70E3 /* News.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89937B5E2C1CCED800ED70E3 /* News.swift */; };
89937B612C1CCF8000ED70E3 /* AllNews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89937B602C1CCF8000ED70E3 /* AllNews.swift */; };
Expand Down Expand Up @@ -54,6 +57,9 @@
6B7453342C1CC7FC000C2955 /* HealthKitViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HealthKitViewModel.swift; sourceTree = "<group>"; };
6B7453362C1CC816000C2955 /* HealthKitManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HealthKitManager.swift; sourceTree = "<group>"; };
6B7453382C1CC90C000C2955 /* Code-Drop-Team-11-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "Code-Drop-Team-11-Info.plist"; sourceTree = SOURCE_ROOT; };
6B7453402C1D062B000C2955 /* DetailView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailView.swift; sourceTree = "<group>"; };
6B7453412C1D062B000C2955 /* HomeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = "<group>"; };
6B7453422C1D062B000C2955 /* ListView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListView.swift; sourceTree = "<group>"; };
89937B5B2C1CC06D00ED70E3 /* NotificationManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationManager.swift; sourceTree = "<group>"; };
89937B5E2C1CCED800ED70E3 /* News.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = News.swift; sourceTree = "<group>"; };
89937B602C1CCF8000ED70E3 /* AllNews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllNews.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -88,6 +94,7 @@
6B7452FB2C1CB36B000C2955 = {
isa = PBXGroup;
children = (
6B7453432C1D062B000C2955 /* Views */,
6B7453062C1CB36B000C2955 /* Code Drop_Team 11 */,
6B7453172C1CB36C000C2955 /* Code Drop_Team 11Tests */,
6B7453212C1CB36C000C2955 /* Code Drop_Team 11UITests */,
Expand Down Expand Up @@ -147,6 +154,16 @@
path = "Code Drop_Team 11UITests";
sourceTree = "<group>";
};
6B7453432C1D062B000C2955 /* Views */ = {
isa = PBXGroup;
children = (
6B7453402C1D062B000C2955 /* DetailView.swift */,
6B7453412C1D062B000C2955 /* HomeView.swift */,
6B7453422C1D062B000C2955 /* ListView.swift */,
);
path = Views;
sourceTree = "<group>";
};
89937B5D2C1CCECA00ED70E3 /* DataModel */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -290,9 +307,12 @@
6B7453352C1CC7FC000C2955 /* HealthKitViewModel.swift in Sources */,
6B74530A2C1CB36B000C2955 /* ContentView.swift in Sources */,
6B7453372C1CC816000C2955 /* HealthKitManager.swift in Sources */,
6B7453442C1D062B000C2955 /* DetailView.swift in Sources */,
89937B5C2C1CC06D00ED70E3 /* NotificationManager.swift in Sources */,
6B7453452C1D062B000C2955 /* HomeView.swift in Sources */,
89937B612C1CCF8000ED70E3 /* AllNews.swift in Sources */,
6B74530A2C1CB36B000C2955 /* ContentView.swift in Sources */,
6B7453462C1D062B000C2955 /* ListView.swift in Sources */,
89937B5F2C1CCED800ED70E3 /* News.swift in Sources */,
6B7453082C1CB36B000C2955 /* Code_Drop_Team_11App.swift in Sources */,
89937B652C1CEA4300ED70E3 /* Quotes.swift in Sources */,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct Code_Drop_Team_11App: App {

var body: some Scene {
WindowGroup {
ContentView()
HomeView()
.environmentObject(vm)
}.modelContainer(for: News.self)
}
Expand Down
44 changes: 44 additions & 0 deletions Code Drop_Team 11/Views/DetailView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// DetailView.swift
// Code Drop_Team 11
//
// Created by Hyun Lee on 6/15/24.
//

import SwiftUI

struct DetailView: View {
var insight: Insight

var body: some View {
VStack {
Text("인사이트")
.multilineTextAlignment(.leading)
.font(.title)
.bold()
Text(insight.title)
.font(.largeTitle)
.padding()
Text(insight.detail)
.font(.body)
.padding()
Spacer()

Text("관련 자료")
.multilineTextAlignment(.leading)
.font(.title)
.bold()
Link(destination: URL(string: "https://www.naver.com" )!) {
Text("Safari App으로 이동해서 보여주기")
}
.foregroundColor(.white)
Spacer()

}
// .navigationBarTitleDisplayMode(.inline)
}
}

#Preview {
DetailView()
}
52 changes: 52 additions & 0 deletions Code Drop_Team 11/Views/HomeView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// HomeView.swift
// Code Drop_Team 11
//
// Created by Hyun Lee on 6/15/24.
//

import SwiftUI

import SwiftUI

struct HomeView: View {
@State private var isShowingDetail = false

var body: some View {
NavigationView {
VStack {
Spacer()
Image("Group 9")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 150, height: 150)
Text("업무를 시작해볼까요?")
.foregroundColor(.white)
Text("중간에 잠깐 쉬고 걷는 것은 효율에 도움이 돼요.")
.foregroundColor(.white)
Spacer()
Button("시작하기") {
self.isShowingDetail.toggle()
}
.padding()
.foregroundColor(.white)
.background(Color.green)
.cornerRadius(8)
.padding()

// NavigationLink(destination: ListView(), isActive: $isShowingDetail) {
// EmptyView()
// }
}
.background(Color.black)
.navigationTitle("6월 15일")
.foregroundColor(.white)
.frame(maxWidth: .infinity)
.background(Color.black.edgesIgnoringSafeArea(.all))
}
}
}

#Preview {
HomeView()
}
39 changes: 39 additions & 0 deletions Code Drop_Team 11/Views/ListView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
//
// ListView.swift
// Code Drop_Team 11
//
// Created by Hyun Lee on 6/15/24.
//

import SwiftUI

struct ListView: View {
var insights: [Insight] = [
Insight(title: "중요한 정보는 왼쪽 위에 배치하세요.", detail: "사람들의 시선은 왼쪽 위에서부터 시작됩니다. 가장 중요한 정보는 왼쪽 위에 배치하는 것이 UX적으로 좋습니다."),
Insight(title: "중요한 정보는 왼쪽 위에 배치하세요.", detail: "사람들의 시선은 왼쪽 위에서부터 시작됩니다. 가장 중요한 정보는 왼쪽 위에 배치하는 것이 UX적으로 좋습니다."),
Insight(title: "중요한 정보는 왼쪽 위에 배치하세요.", detail: "사람들의 시선은 왼쪽 위에서부터 시작됩니다. 가장 중요한 정보는 왼쪽 위에 배치하는 것이 UX적으로 좋습니다."),
]

var body: some View {
NavigationStack {
List {
ForEach(insights) { insight in
NavigationLink {
DetailView(insight: insight)
} label: {
VStack {
Text(insight.title)
.bold()
Text(insight.detail)
}
}

}
}
}
}
}

#Preview {
ListView()
}

0 comments on commit 735cc1e

Please sign in to comment.