-
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.
* [WEAV-73] 프로필 입력 - 성별선택 뷰 구현 * [WEAV-73] 오타수정
- Loading branch information
1 parent
4c2f234
commit 4ec2d71
Showing
24 changed files
with
323 additions
and
14 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
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
Projects/DesignSystem/DesignCore/Resources/Images/Images.xcassets/Gender/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 | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...DesignCore/Resources/Images/Images.xcassets/Gender/female_selected.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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "female_selected.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+23.1 KB
...rces/Images/Images.xcassets/Gender/female_selected.imageset/female_selected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+74.8 KB
...s/Images/Images.xcassets/Gender/female_selected.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+135 KB
...s/Images/Images.xcassets/Gender/female_selected.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...signCore/Resources/Images/Images.xcassets/Gender/female_unselected.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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "female_unselected.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+13.8 KB
.../Images/Images.xcassets/Gender/female_unselected.imageset/female_unselected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+41.3 KB
...ages/Images.xcassets/Gender/female_unselected.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+80.8 KB
...ages/Images.xcassets/Gender/female_unselected.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...m/DesignCore/Resources/Images/Images.xcassets/Gender/male_selected.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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "male_selected.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+22.5 KB
...esources/Images/Images.xcassets/Gender/male_selected.imageset/male_selected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+71.7 KB
...urces/Images/Images.xcassets/Gender/male_selected.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+129 KB
...urces/Images/Images.xcassets/Gender/male_selected.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...DesignCore/Resources/Images/Images.xcassets/Gender/male_unselected.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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "male_unselected.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "[email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+13.2 KB
...rces/Images/Images.xcassets/Gender/male_unselected.imageset/male_unselected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+38.7 KB
...s/Images/Images.xcassets/Gender/male_unselected.imageset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+75.7 KB
...s/Images/Images.xcassets/Gender/male_unselected.imageset/[email protected]
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
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
53 changes: 53 additions & 0 deletions
53
Projects/Features/SignUp/Sources/ProfileInput/AuthGreeting/AuthGreetingView.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,53 @@ | ||
// | ||
// AuthGreetingView.swift | ||
// DesignPreview | ||
// | ||
// Created by 김지수 on 10/1/24. | ||
// Copyright © 2024 com.weave. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
import CommonKit | ||
import DesignCore | ||
|
||
public struct AuthGreetingView: View { | ||
@State var isAppeared = false | ||
|
||
public init() {} | ||
|
||
public var body: some View { | ||
VStack { | ||
Text("만나서 반가워요!\n당신이 어떤 사람인지 알려주세요.") | ||
.typography(.semibold_24) | ||
.multilineTextAlignment(.center) | ||
.foregroundStyle(DesignCore.Colors.grey500) | ||
.opacity(isAppeared ? 1.0 : 0.0) | ||
.offset(y: isAppeared ? 0 : -24) | ||
|
||
Spacer() | ||
|
||
CTAButton(title: "알려주러 가기") { | ||
AppCoordinator.shared.push( | ||
.signUp(.authProfileGender) | ||
) | ||
} | ||
.padding(.horizontal, 24) | ||
.opacity(isAppeared ? 1.0 : 0.0) | ||
.offset(y: isAppeared ? 0 : -24) | ||
|
||
Spacer() | ||
} | ||
.ignoresSafeArea() | ||
.padding(.top, 155) | ||
.textureBackground() | ||
.onAppear { | ||
withAnimation(.easeInOut(duration: 0.6)) { | ||
isAppeared = true | ||
} | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
AuthGreetingView() | ||
} |
88 changes: 88 additions & 0 deletions
88
...tures/SignUp/Sources/ProfileInput/AuthProfileGenderInput/AuthProfileGenderInputView.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,88 @@ | ||
// | ||
// AuthProfileGenderInputView.swift | ||
// DesignPreview | ||
// | ||
// Created by 김지수 on 10/1/24. | ||
// Copyright © 2024 com.weave. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
import DesignCore | ||
import CommonKit | ||
|
||
enum GenderType: CaseIterable { | ||
case male | ||
case female | ||
|
||
var unselectedImage: Image { | ||
switch self { | ||
case .male: DesignCore.Images.maleUnselected.image | ||
case .female: DesignCore.Images.femaleUnselected.image | ||
} | ||
} | ||
|
||
var selectedImage: Image { | ||
switch self { | ||
case .male: DesignCore.Images.maleSelected.image | ||
case .female: DesignCore.Images.femaleSelected.image | ||
} | ||
} | ||
} | ||
|
||
public struct AuthProfileGenderInputView: View { | ||
@State var selectedGender: GenderType? | ||
|
||
public init() {} | ||
|
||
public var body: some View { | ||
VStack { | ||
ProfileInputTemplatedView( | ||
currentPage: 1, | ||
maxPage: 5, | ||
subMessage: "만나서 반가워요!", | ||
mainMessage: "당신의 성별은 무엇인가요?" | ||
) { | ||
HStack(spacing: 0) { | ||
Spacer() | ||
ForEach(GenderType.allCases, id: \.self) { type in | ||
if selectedGender == type { | ||
type.selectedImage | ||
.resizable() | ||
.frame(width: 130, height: 130) | ||
} else { | ||
type.unselectedImage | ||
.resizable() | ||
.frame(width: 130, height: 130) | ||
.onTapGesture { | ||
withAnimation { | ||
selectedGender = type | ||
} | ||
} | ||
} | ||
} | ||
Spacer() | ||
} | ||
} | ||
|
||
Spacer() | ||
|
||
CTABottomButton( | ||
title: "다음", | ||
isActive: selectedGender != nil | ||
) { | ||
|
||
} | ||
} | ||
.padding(.top, 10) | ||
.textureBackground() | ||
.setNavigation(showLeftBackButton: false) { | ||
|
||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
NavigationView { | ||
AuthProfileGenderInputView() | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
Projects/Features/SignUp/Sources/ProfileInput/ProfileInputTemplatedView.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,51 @@ | ||
// | ||
// ProfileInputTemplatedView.swift | ||
// DesignPreview | ||
// | ||
// Created by 김지수 on 10/1/24. | ||
// Copyright © 2024 com.weave. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
import DesignCore | ||
|
||
struct ProfileInputTemplatedView<ContentView: View>: View { | ||
|
||
let currentPage: Int | ||
let maxPage: Int | ||
let subMessage: String | ||
let mainMessage: String | ||
@ViewBuilder var contentView: () -> ContentView | ||
|
||
var body: some View { | ||
VStack(alignment: .leading, spacing: 20) { | ||
HStack(spacing: 0) { | ||
Text("\(currentPage)") | ||
.foregroundStyle(DesignCore.Colors.blue300) | ||
Text("/\(maxPage)") | ||
.foregroundStyle(DesignCore.Colors.grey300) | ||
} | ||
.padding(.horizontal, 10) | ||
.padding(.vertical, 2) | ||
.background { | ||
Capsule() | ||
.foregroundStyle(.white) | ||
} | ||
.typography(.regular_15) | ||
.padding(.horizontal, 26) | ||
|
||
VStack(spacing: 0) { | ||
LeftAlignText(subMessage) | ||
.typography(.regular_14) | ||
.foregroundStyle(DesignCore.Colors.grey200) | ||
LeftAlignText(mainMessage) | ||
.typography(.semibold_24) | ||
.foregroundStyle(DesignCore.Colors.grey500) | ||
} | ||
.padding(.horizontal, 26) | ||
|
||
contentView() | ||
.padding(.horizontal, 26) | ||
} | ||
} | ||
} |