Skip to content
Merged
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
84 changes: 84 additions & 0 deletions SwiftUIDev/SwiftUIDev.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,31 @@
objects = {

/* Begin PBXBuildFile section */
3805A7A9289EFD30009A34A3 /* Gotham-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 3805A7A8289EFD30009A34A3 /* Gotham-Bold.otf */; };
3805A7AB289EFD3E009A34A3 /* Gotham-Black.otf in Resources */ = {isa = PBXBuildFile; fileRef = 3805A7AA289EFD3E009A34A3 /* Gotham-Black.otf */; };
3861D1A8289EE5CE0001C187 /* SwiftUIDevApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3861D1A7289EE5CE0001C187 /* SwiftUIDevApp.swift */; };
3861D1AA289EE5CE0001C187 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3861D1A9289EE5CE0001C187 /* ContentView.swift */; };
3861D1AC289EE5CE0001C187 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3861D1AB289EE5CE0001C187 /* Assets.xcassets */; };
3861D1AF289EE5CE0001C187 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3861D1AE289EE5CE0001C187 /* Preview Assets.xcassets */; };
3861D1B6289EE6900001C187 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3861D1B5289EE6900001C187 /* Model.swift */; };
3861D1B9289EE6A70001C187 /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3861D1B8289EE6A70001C187 /* LoginView.swift */; };
38E88C6028A480B200B6634E /* SignupButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38E88C5F28A480B200B6634E /* SignupButton.swift */; };
38E88C6328A4826200B6634E /* Text+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38E88C6228A4826200B6634E /* Text+.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
3805A7A8289EFD30009A34A3 /* Gotham-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Gotham-Bold.otf"; sourceTree = "<group>"; };
3805A7AA289EFD3E009A34A3 /* Gotham-Black.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Gotham-Black.otf"; sourceTree = "<group>"; };
3805A7AC289EFDD2009A34A3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
3861D1A4289EE5CE0001C187 /* SwiftUIDev.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftUIDev.app; sourceTree = BUILT_PRODUCTS_DIR; };
3861D1A7289EE5CE0001C187 /* SwiftUIDevApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUIDevApp.swift; sourceTree = "<group>"; };
3861D1A9289EE5CE0001C187 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
3861D1AB289EE5CE0001C187 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
3861D1AE289EE5CE0001C187 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
3861D1B5289EE6900001C187 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = "<group>"; };
3861D1B8289EE6A70001C187 /* LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = "<group>"; };
38E88C5F28A480B200B6634E /* SignupButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignupButton.swift; sourceTree = "<group>"; };
38E88C6228A4826200B6634E /* Text+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Text+.swift"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -32,6 +45,15 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
3805A7AD289EFE00009A34A3 /* Fonts */ = {
isa = PBXGroup;
children = (
3805A7A8289EFD30009A34A3 /* Gotham-Bold.otf */,
3805A7AA289EFD3E009A34A3 /* Gotham-Black.otf */,
);
path = Fonts;
sourceTree = "<group>";
};
3861D19B289EE5CE0001C187 = {
isa = PBXGroup;
children = (
Expand All @@ -51,6 +73,8 @@
3861D1A6289EE5CE0001C187 /* SwiftUIDev */ = {
isa = PBXGroup;
children = (
3805A7AC289EFDD2009A34A3 /* Info.plist */,
3861D1B7289EE6970001C187 /* Spotify */,
3861D1A7289EE5CE0001C187 /* SwiftUIDevApp.swift */,
3861D1A9289EE5CE0001C187 /* ContentView.swift */,
3861D1AB289EE5CE0001C187 /* Assets.xcassets */,
Expand All @@ -67,6 +91,58 @@
path = "Preview Content";
sourceTree = "<group>";
};
3861D1B7289EE6970001C187 /* Spotify */ = {
isa = PBXGroup;
children = (
38E88C6528A48A9B00B6634E /* Screens */,
38E88C6428A48A9200B6634E /* Global */,
);
path = Spotify;
sourceTree = "<group>";
};
38E88C5E28A4809200B6634E /* UIComponents */ = {
isa = PBXGroup;
children = (
38E88C5F28A480B200B6634E /* SignupButton.swift */,
);
path = UIComponents;
sourceTree = "<group>";
};
38E88C6128A4823600B6634E /* Extensions */ = {
isa = PBXGroup;
children = (
38E88C6228A4826200B6634E /* Text+.swift */,
);
path = Extensions;
sourceTree = "<group>";
};
38E88C6428A48A9200B6634E /* Global */ = {
isa = PBXGroup;
children = (
38E88C6728A48ACD00B6634E /* Resources */,
38E88C5E28A4809200B6634E /* UIComponents */,
38E88C6128A4823600B6634E /* Extensions */,
);
path = Global;
sourceTree = "<group>";
};
38E88C6528A48A9B00B6634E /* Screens */ = {
isa = PBXGroup;
children = (
3861D1B8289EE6A70001C187 /* LoginView.swift */,
);
path = Screens;
sourceTree = "<group>";
};
38E88C6728A48ACD00B6634E /* Resources */ = {
isa = PBXGroup;
children = (
3861D1B5289EE6900001C187 /* Model.swift */,
3805A7AD289EFE00009A34A3 /* Fonts */,
);
path = Resources;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -125,6 +201,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3805A7A9289EFD30009A34A3 /* Gotham-Bold.otf in Resources */,
3805A7AB289EFD3E009A34A3 /* Gotham-Black.otf in Resources */,
3861D1AF289EE5CE0001C187 /* Preview Assets.xcassets in Resources */,
3861D1AC289EE5CE0001C187 /* Assets.xcassets in Resources */,
);
Expand All @@ -137,7 +215,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3861D1B6289EE6900001C187 /* Model.swift in Sources */,
3861D1AA289EE5CE0001C187 /* ContentView.swift in Sources */,
38E88C6028A480B200B6634E /* SignupButton.swift in Sources */,
3861D1B9289EE6A70001C187 /* LoginView.swift in Sources */,
38E88C6328A4826200B6634E /* Text+.swift in Sources */,
3861D1A8289EE5CE0001C187 /* SwiftUIDevApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -270,6 +352,7 @@
DEVELOPMENT_TEAM = 82DRSFKFS9;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = SwiftUIDev/Info.plist;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
Expand Down Expand Up @@ -299,6 +382,7 @@
DEVELOPMENT_TEAM = 82DRSFKFS9;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = SwiftUIDev/Info.plist;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"idiom" : "ipad",
"scale" : "2x",
Expand Down
21 changes: 21 additions & 0 deletions SwiftUIDev/SwiftUIDev/Assets.xcassets/apple.imageset/Contents.json
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.
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.
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.
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.
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
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions SwiftUIDev/SwiftUIDev/Info.plist
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 SwiftUIDev/SwiftUIDev/Spotify/Global/Extensions/Text+.swift
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 not shown.
Binary file not shown.
50 changes: 50 additions & 0 deletions SwiftUIDev/SwiftUIDev/Spotify/Global/Resources/Model.swift
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

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
}
}
}
Loading