-
Notifications
You must be signed in to change notification settings - Fork 0
[Spotify] 로그인 화면 UI 구현 #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
6967675
[Feat] 버튼 type enum 으로 추가
deslog a59a76d
[Feat] 회원가입 타입별 버튼 생성
deslog 2954ce1
[Feat] 배경 및 버튼 body에 추가
deslog 830bb1a
[Feat] 로그인 버튼 추가
deslog 260de4b
[Feat] title 추가
deslog b7fe3db
[Feat] 상수값 따로 빼기
deslog 437d1f8
[Feat] Dynamic font size 추출 func 추가
deslog 4a47de7
[Add] 이미지 assets 추가
deslog acd1292
[Add] 폰트 추가 및 info.plist 수정
deslog ad35d2c
[Feat] main 코드 수정 contentview -> loginView
deslog 424f34a
[Feat] Text extension 추가
deslog 1abf339
[Feat] signup 버튼 ui 컴포넌트로 분리
deslog 40bd3ad
[Feat] 폰트 스타일 익스텐션 적용
deslog b82a335
[Refactor] enum 타입 이름 변경
deslog 4f98026
[Fix] signup 이미지 nil로 변경
deslog 44d064b
[Feat] 패딩값 따로 분리
deslog 9fbf06d
[Fix] 폴더 정리
deslog 491f43c
[Refactor] 아이폰12미니 두줄 넘어가는 이슈
deslog ca07def
[Refactor] 띄어쓰기 수정 (코드리뷰반영)
deslog 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 hidden or 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
This file contains hidden or 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
21 changes: 21 additions & 0 deletions
21
SwiftUIDev/SwiftUIDev/Assets.xcassets/apple.imageset/Contents.json
This file contains hidden or 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,21 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "apple.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
SwiftUIDev/SwiftUIDev/Assets.xcassets/facebook.imageset/Contents.json
This file contains hidden or 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,21 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "facebook.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
SwiftUIDev/SwiftUIDev/Assets.xcassets/google.imageset/Contents.json
This file contains hidden or 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,21 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "google.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
SwiftUIDev/SwiftUIDev/Assets.xcassets/spotify.imageset/Contents.json
This file contains hidden or 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,21 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "spotify.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
SwiftUIDev/SwiftUIDev/Assets.xcassets/spotify_login_image.imageset/Contents.json
This file contains hidden or 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,21 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "spotify_login_image.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "idiom" : "universal", | ||
| "scale" : "3x" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
Binary file added
BIN
+317 KB
...SwiftUIDev/Assets.xcassets/spotify_login_image.imageset/spotify_login_image.png
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 hidden or 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,11 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <key>UIAppFonts</key> | ||
| <array> | ||
| <string>Gotham-Bold.otf</string> | ||
| <string>Gotham-Black.otf</string> | ||
| </array> | ||
| </dict> | ||
| </plist> |
30 changes: 30 additions & 0 deletions
30
SwiftUIDev/SwiftUIDev/Spotify/Global/Extensions/Text+.swift
This file contains hidden or 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,30 @@ | ||
| // | ||
| // Text+.swift | ||
| // SwiftUIDev | ||
| // | ||
| // Created by LeeJiSoo on 2022/08/11. | ||
| // | ||
|
|
||
| import SwiftUI | ||
|
|
||
| extension Text { | ||
|
|
||
| func signupButtonFontStyle(dynamicStyle: UIFont.TextStyle, type: SignupType) -> Text { | ||
| self.font(.custom("Gotham-Bold", size: textSize(dynamicStyle))) | ||
| .foregroundColor(type == .signup ? Color.black : Color.white) | ||
| } | ||
|
|
||
| func loginFontStyle() -> Text { | ||
| self.font(.custom("Gotham-Bold", size: textSize(.title3))) | ||
| .foregroundColor(.white) | ||
| } | ||
|
|
||
| func titleFontStyle() -> Text { | ||
| self.font(.custom("Gotham-Black", size: textSize(.largeTitle))) | ||
| .foregroundColor(.white) | ||
| } | ||
|
|
||
| private func textSize(_ textStyle: UIFont.TextStyle) -> CGFloat { | ||
| return UIFont.preferredFont(forTextStyle: textStyle).pointSize | ||
| } | ||
| } | ||
Binary file added
BIN
+29.9 KB
SwiftUIDev/SwiftUIDev/Spotify/Global/Resources/Fonts/Gotham-Black.otf
Binary file not shown.
Binary file not shown.
50 changes: 50 additions & 0 deletions
50
SwiftUIDev/SwiftUIDev/Spotify/Global/Resources/Model.swift
This file contains hidden or 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,50 @@ | ||
| // | ||
| // Model.swift | ||
| // SwiftUIDev | ||
| // | ||
| // Created by LeeJiSoo on 2022/08/07. | ||
| // | ||
|
|
||
| import SwiftUI | ||
|
|
||
| enum SignupType: CaseIterable { | ||
| case signup | ||
| case google | ||
| case facebook | ||
| case apple | ||
deslog marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| var title: String { | ||
| switch self { | ||
| case .signup: | ||
| return "Sign up" | ||
| case .google: | ||
| return "Continue with Google" | ||
| case .facebook: | ||
| return "Continue with Facebook" | ||
| case .apple: | ||
| return "Continue with Apple" | ||
| } | ||
| } | ||
|
|
||
| var logoImage: Image? { | ||
| switch self { | ||
| case .google: | ||
| return Image("google") | ||
| case .facebook: | ||
| return Image("facebook") | ||
| case .apple: | ||
| return Image("apple") | ||
| default: | ||
| return nil | ||
| } | ||
| } | ||
|
|
||
| var color: Color { | ||
| switch self { | ||
| case .signup: | ||
| return .green | ||
| default: | ||
| return .black | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.