Onboarding 페이지 추가
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
21
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_0.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "img_guide_0.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_0.imageset/img_guide_0.png
vendored
Normal file
After Width: | Height: | Size: 772 KiB |
21
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_1.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "img_guide_1.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_1.imageset/img_guide_1.png
vendored
Normal file
After Width: | Height: | Size: 554 KiB |
21
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_2.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "img_guide_2.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_2.imageset/img_guide_2.png
vendored
Normal file
After Width: | Height: | Size: 320 KiB |
21
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_3.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "img_guide_3.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_3.imageset/img_guide_3.png
vendored
Normal file
After Width: | Height: | Size: 617 KiB |
21
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_4.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "img_guide_4.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_4.imageset/img_guide_4.png
vendored
Normal file
After Width: | Height: | Size: 678 KiB |
21
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_5.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "img_guide_5.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_5.imageset/img_guide_5.png
vendored
Normal file
After Width: | Height: | Size: 531 KiB |
21
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_6.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "img_guide_6.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
SodaLive/Resources/Assets.xcassets/onboarding/img_guide_6.imageset/img_guide_6.png
vendored
Normal file
After Width: | Height: | Size: 252 KiB |
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
@ -2,6 +2,19 @@
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>FirebaseAppDelegateProxyEnabled</key>
|
||||||
|
<false/>
|
||||||
|
<key>NSAppTransportSecurity</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
<key>UIAppFonts</key>
|
||||||
|
<array>
|
||||||
|
<string>gmarket_sans_bold.otf</string>
|
||||||
|
<string>gmarket_sans_medium.otf</string>
|
||||||
|
<string>gmarket_sans_light.otf</string>
|
||||||
|
</array>
|
||||||
<key>UIBackgroundModes</key>
|
<key>UIBackgroundModes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>audio</string>
|
<string>audio</string>
|
||||||
|
|
|
@ -2,6 +2,13 @@
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>FirebaseAppDelegateProxyEnabled</key>
|
||||||
|
<false/>
|
||||||
|
<key>NSAppTransportSecurity</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
<key>UIAppFonts</key>
|
<key>UIAppFonts</key>
|
||||||
<array>
|
<array>
|
||||||
<string>gmarket_sans_bold.otf</string>
|
<string>gmarket_sans_bold.otf</string>
|
||||||
|
|
|
@ -14,6 +14,8 @@ struct ContentView: View {
|
||||||
ZStack {
|
ZStack {
|
||||||
Color.black.ignoresSafeArea()
|
Color.black.ignoresSafeArea()
|
||||||
|
|
||||||
|
MainView()
|
||||||
|
|
||||||
switch appState.appStep {
|
switch appState.appStep {
|
||||||
case .splash:
|
case .splash:
|
||||||
SplashView()
|
SplashView()
|
||||||
|
|
|
@ -17,7 +17,6 @@ enum UserDefaultsKey: String, CaseIterable {
|
||||||
case nickname
|
case nickname
|
||||||
case pushToken
|
case pushToken
|
||||||
case profileImage
|
case profileImage
|
||||||
case voipPushToken
|
|
||||||
case devicePushToken
|
case devicePushToken
|
||||||
case isContentPlayLoop
|
case isContentPlayLoop
|
||||||
case isFollowedCreatorLive
|
case isFollowedCreatorLive
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
//
|
||||||
|
// Font.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2023/08/09.
|
||||||
|
//
|
||||||
|
|
||||||
|
enum Font: String {
|
||||||
|
case bold = "GmarketSansBold"
|
||||||
|
|
||||||
|
case medium = "GmarketSansMedium"
|
||||||
|
|
||||||
|
case light = "GmarketSansLight"
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
//
|
||||||
|
// HomeView.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2023/08/09.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct HomeView: View {
|
||||||
|
var body: some View {
|
||||||
|
Text("Home View")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct HomeView_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
HomeView()
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
//
|
||||||
|
// MainView.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2023/08/09.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct MainView: View {
|
||||||
|
|
||||||
|
@AppStorage("token") private var token: String = UserDefaults.string(forKey: UserDefaultsKey.token)
|
||||||
|
@AppStorage("isViewedOnboardingView") private var isViewedOnboardingView: Bool = UserDefaults.bool(forKey: .isViewedOnboardingView)
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
if isViewedOnboardingView {
|
||||||
|
if token.count > 0 {
|
||||||
|
HomeView()
|
||||||
|
} else {
|
||||||
|
LoginView()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
OnboardingView()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct MainView_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
MainView()
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,85 @@
|
||||||
|
//
|
||||||
|
// OnboardingView.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2023/08/09.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct OnboardingView: View {
|
||||||
|
|
||||||
|
@State private var selection = 0
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
GeometryReader { proxy in
|
||||||
|
ZStack {
|
||||||
|
VStack(spacing: 0) {
|
||||||
|
TabView(selection: $selection) {
|
||||||
|
Image("img_guide_0")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFit()
|
||||||
|
.tag(0)
|
||||||
|
|
||||||
|
Image("img_guide_1")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFit()
|
||||||
|
.tag(1)
|
||||||
|
|
||||||
|
Image("img_guide_2")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFit()
|
||||||
|
.tag(2)
|
||||||
|
|
||||||
|
Image("img_guide_3")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFit()
|
||||||
|
.tag(3)
|
||||||
|
|
||||||
|
Image("img_guide_4")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFit()
|
||||||
|
.tag(4)
|
||||||
|
|
||||||
|
Image("img_guide_5")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFit()
|
||||||
|
.tag(5)
|
||||||
|
|
||||||
|
Image("img_guide_6")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFit()
|
||||||
|
.tag(6)
|
||||||
|
}
|
||||||
|
.tabViewStyle(PageTabViewStyle())
|
||||||
|
.onAppear {
|
||||||
|
UIPageControl.appearance().pageIndicatorTintColor = UIColor(hex: "555555", alpha: 0.24)
|
||||||
|
UIPageControl.appearance().currentPageIndicatorTintColor = UIColor(hex: "1313BC")
|
||||||
|
}
|
||||||
|
|
||||||
|
Text("시작하기")
|
||||||
|
.font(.custom(Font.bold.rawValue, size: 18.3))
|
||||||
|
.foregroundColor(Color(hex: "1313BC"))
|
||||||
|
.frame(width: screenSize().width, height: 60)
|
||||||
|
.background(Color(hex: "80D8FF"))
|
||||||
|
.onTapGesture {
|
||||||
|
UserDefaults.set(true, forKey: .isViewedOnboardingView)
|
||||||
|
}
|
||||||
|
|
||||||
|
if proxy.safeAreaInsets.bottom > 0 {
|
||||||
|
Rectangle()
|
||||||
|
.foregroundColor(Color(hex: "80D8FF"))
|
||||||
|
.frame(width: proxy.size.width, height: 15.3)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ignoresSafeArea()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct OnboardingView_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
OnboardingView()
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
//
|
||||||
|
// LoginView.swift
|
||||||
|
// SodaLive
|
||||||
|
//
|
||||||
|
// Created by klaus on 2023/08/09.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct LoginView: View {
|
||||||
|
var body: some View {
|
||||||
|
Text("Login View")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct LoginView_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
LoginView()
|
||||||
|
}
|
||||||
|
}
|