-
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.
Merge pull request #7 from Swift-Coding-Club/feature/MainViewUI
Feature/main view UI
- Loading branch information
Showing
21 changed files
with
255 additions
and
2 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
6 changes: 6 additions & 0 deletions
6
TodayPhoto/TodayPhoto/Resource/Assets.xcassets/Icon/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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
TodayPhoto/TodayPhoto/Resource/Assets.xcassets/Icon/FeedView/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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
TodayPhoto/TodayPhoto/Resource/Assets.xcassets/Icon/FeedView/mapPin/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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...dayPhoto/Resource/Assets.xcassets/Icon/FeedView/mapPin/mapPinBlack.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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "mapPinBlack.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
...ource/Assets.xcassets/Icon/FeedView/mapPin/mapPinBlack.imageset/mapPinBlack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
...dayPhoto/Resource/Assets.xcassets/Icon/FeedView/mapPin/mapPinWhite.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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "mapPinWhite.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
...ource/Assets.xcassets/Icon/FeedView/mapPin/mapPinWhite.imageset/mapPinWhite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
TodayPhoto/TodayPhoto/Resource/Assets.xcassets/Icon/FeedView/music/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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...TodayPhoto/Resource/Assets.xcassets/Icon/FeedView/music/musicBlack.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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "musicBlack.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...Resource/Assets.xcassets/Icon/FeedView/music/musicBlack.imageset/musicBlack.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
...TodayPhoto/Resource/Assets.xcassets/Icon/FeedView/music/musicWhite.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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "musicWhite.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...Resource/Assets.xcassets/Icon/FeedView/music/musicWhite.imageset/musicWhite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
TodayPhoto/TodayPhoto/Resource/Assets.xcassets/Icon/FeedView/trash/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,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...hoto/TodayPhoto/Resource/Assets.xcassets/Icon/FeedView/trash/trash.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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "trash.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
...odayPhoto/Resource/Assets.xcassets/Icon/FeedView/trash/trash.imageset/trash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
TodayPhoto/TodayPhoto/Resource/Assets.xcassets/testImg.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,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "testImg.jpg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+314 KB
TodayPhoto/TodayPhoto/Resource/Assets.xcassets/testImg.imageset/testImg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
89 changes: 89 additions & 0 deletions
89
TodayPhoto/TodayPhoto/Source/Views/MainView/FeedView.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,89 @@ | ||
// | ||
// FeedView.swift | ||
// TodayPhoto | ||
// | ||
// Created by 김동윤 on 2023/02/16. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct FeedView: View { | ||
|
||
@State private var feedViewToggle = true | ||
|
||
var body: some View { | ||
|
||
let feedViewHeight = CGFloat(623) | ||
let feedViewWidth = CGFloat(UIScreen.main.bounds.width - 40) | ||
|
||
Button { | ||
feedViewToggle.toggle() | ||
} label: { | ||
ZStack { | ||
if feedViewToggle { | ||
Image("testImg") | ||
.resizable() | ||
.scaledToFill() | ||
} | ||
VStack { | ||
// 날짜 text | ||
HStack { | ||
VStack(alignment: .center) { | ||
Text("13") | ||
.font(Font.pretendard(size: feedViewToggle ? 80 : 60, family: .semiBold)) | ||
Text("Thursday") | ||
.font(Font.pretendard(size: feedViewToggle ? 22 : 16, family: .regular)) | ||
} | ||
.padding(EdgeInsets(top: 25, leading: 30, bottom: 0, trailing: 0)) | ||
.foregroundColor(feedViewToggle ? Color.white : Color.primarPurpleDark) | ||
.shadow(radius: feedViewToggle ? 10 : 0) | ||
.animation(.spring(), value: feedViewToggle) | ||
Spacer() | ||
} | ||
if !feedViewToggle { | ||
// 제목 text | ||
HStack { | ||
|
||
Text("일기 제목") | ||
.font(Font.pretendard(size: 24, family: .bold)) | ||
.foregroundColor(Color.primarPurpleDark) | ||
.padding(EdgeInsets(top: 20, leading: 30, bottom: 0, trailing: 0)) | ||
|
||
Spacer() | ||
} | ||
// 일기 본문 text | ||
Text("하여도 기쁘며, 인간이 천자만홍이 보배를 것이다. 가치를 가슴에 때에, 청춘에서만 꽃이 힘차게 바이며, 사는가 몸이 있다. 방지하는 내려온 이상의 수 온갖 피부가 것은 있는 따뜻한 끓는다. 있는 꽃이 생생하며, 물방아 들어 피고 피가 이는 사막이다. 든 우리 뼈 봄바람이다.") | ||
.font(Font.pretendard(size: 20, family: .medium)) | ||
.multilineTextAlignment(.leading) | ||
.foregroundColor(Color.primaryBlackDark) | ||
.padding(EdgeInsets(top: 1, leading: 30, bottom: 0, trailing: 30)) | ||
} | ||
Spacer() | ||
// 지역, 노래 label | ||
HStack { | ||
VStack(alignment: .leading) { | ||
Label("서울특별시 종로구", image: "mapPin\(feedViewToggle ? "White" : "Black")") | ||
Label("노래 - 가수", image: "music\(feedViewToggle ? "White" : "Black")") | ||
} | ||
.font(Font.pretendard(size: 18, family: .regular)) | ||
.foregroundColor(feedViewToggle ? Color.white : Color.primaryBlackDark) | ||
.padding(EdgeInsets(top: 0, leading: 30, bottom: 30, trailing: 0)) | ||
Spacer() | ||
} | ||
} | ||
.frame(width: feedViewWidth, height: feedViewHeight) | ||
} | ||
.frame(width: feedViewWidth, height: feedViewHeight) | ||
.clipped() | ||
.background(Color.white) | ||
.cornerRadius(15) | ||
.shadow(radius: 15) | ||
} | ||
} | ||
} | ||
|
||
struct FeedView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
FeedView() | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
TodayPhoto/TodayPhoto/Source/Views/MainView/MainView.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,20 @@ | ||
// | ||
// MainView.swift | ||
// TodayPhoto | ||
// | ||
// Created by 김동윤 on 2023/02/15. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct MainView: View { | ||
var body: some View { | ||
FeedView() | ||
} | ||
} | ||
|
||
struct MainView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
MainView() | ||
} | ||
} |