-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/main view feed view UI #7
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ee5640a
:wrench: :: Add MainView file
drew105 807fc53
:truck: Add FeedView test image
drew105 b98ccf9
:wrench: :: Add FeedView file
drew105 1d91ae2
:truck: :: Add FeedView icon image
drew105 4d15775
:truck: :: Add FeedView icon
drew105 c4aee95
:memo: :: Downgrade to iOS Target 16
drew105 c41dfc0
:bug: :: Fixed ColorExtension typo
drew105 f93d15d
:sparkles: :: Add FeedView
drew105 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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() | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VStack๊ณผ HStack... ๋ณด๋ฉด ๋ณผ์๋ก ์ ๊ธฐํ ์นญ๊ตฌ๋