diff --git a/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/cozyNickName.imageset/cozyNickName.svg b/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/cozyNickName.imageset/cozyNickName.svg
new file mode 100644
index 00000000..aecfcfd0
--- /dev/null
+++ b/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/cozyNickName.imageset/cozyNickName.svg
@@ -0,0 +1,16 @@
+
diff --git a/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/crunchyNickname.imageset/crunchyNickname.svg b/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/crunchyNickname.imageset/crunchyNickname.svg
new file mode 100644
index 00000000..ff67e4b9
--- /dev/null
+++ b/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/crunchyNickname.imageset/crunchyNickname.svg
@@ -0,0 +1,16 @@
+
diff --git a/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/morakNickname.imageset/morakNickname.svg b/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/morakNickname.imageset/morakNickname.svg
new file mode 100644
index 00000000..e94ec754
--- /dev/null
+++ b/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/morakNickname.imageset/morakNickname.svg
@@ -0,0 +1,16 @@
+
diff --git a/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/pomsilNickname.imageset/pomsilNickname.svg b/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/pomsilNickname.imageset/pomsilNickname.svg
new file mode 100644
index 00000000..c0388fe0
--- /dev/null
+++ b/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/pomsilNickname.imageset/pomsilNickname.svg
@@ -0,0 +1,16 @@
+
diff --git a/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/softNickName.imageset/softNickName.svg b/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/softNickName.imageset/softNickName.svg
new file mode 100644
index 00000000..61180449
--- /dev/null
+++ b/PingPong/Projects/DesignSystem/Resources/ImageAssets.xcassets/ProfileImage/softNickName.imageset/softNickName.svg
@@ -0,0 +1,16 @@
+
diff --git a/PingPong/Projects/Feature/Profile/Sources/UI/View/ChangeNickNameView/ChangeNickNameView.swift b/PingPong/Projects/Feature/Profile/Sources/UI/View/ChangeNickNameView/ChangeNickNameView.swift
index 81ba1b3e..7ccdb184 100644
--- a/PingPong/Projects/Feature/Profile/Sources/UI/View/ChangeNickNameView/ChangeNickNameView.swift
+++ b/PingPong/Projects/Feature/Profile/Sources/UI/View/ChangeNickNameView/ChangeNickNameView.swift
@@ -91,6 +91,9 @@ struct ChangeNickNameView: View {
}
+ .task {
+ viewModel.changeNickName = ""
+ }
diff --git a/PingPong/Projects/Feature/Profile/Sources/UI/View/MainView/ProfileView.swift b/PingPong/Projects/Feature/Profile/Sources/UI/View/MainView/ProfileView.swift
index cc01bef2..70b974d8 100644
--- a/PingPong/Projects/Feature/Profile/Sources/UI/View/MainView/ProfileView.swift
+++ b/PingPong/Projects/Feature/Profile/Sources/UI/View/MainView/ProfileView.swift
@@ -66,6 +66,7 @@ public struct ProfileView: View {
.task {
authViewModel.searchUserIdRequest(uid: "\(authViewModel.userid)")
+ profileViewModel.chnageImage()
if profileViewModel.randomNickName == "" {
await profileViewModel.randomNameRequest(commCdTpCd: .userDesc)
}
@@ -94,7 +95,8 @@ public struct ProfileView: View {
profileViewModel.changeNickNameSuccessPOPUP.toggle()
}
}
- .presentationDetents([UIScreen.main.bounds.height.native == 667 ? .height(UIScreen.screenHeight/2 + UIScreen.screenWidth*0.2) : .height(UIScreen.screenHeight/3 + UIScreen.screenWidth*0.2)])
+ .ignoresSafeArea(.keyboard)
+ .presentationDetents([UIScreen.main.bounds.height.native == 667 ? .height(UIScreen.screenHeight/2 + UIScreen.screenWidth*0.7) : .height(UIScreen.screenHeight/3 + UIScreen.screenWidth*0.7)])
.presentationCornerRadius(20)
})
@@ -161,6 +163,12 @@ public struct ProfileView: View {
Circle()
.frame(width: 57, height: 57)
.foregroundColor(.sweetFilter)
+ .overlay {
+ Image(assetName: profileViewModel.changeNickImage)
+ .resizable()
+ .scaledToFit()
+ .frame(width: 57, height: 57)
+ }
Spacer()
.frame(width: 16)
diff --git a/PingPong/Projects/Feature/Profile/Sources/UI/View/ViewModel/ProfileViewViewModel.swift b/PingPong/Projects/Feature/Profile/Sources/UI/View/ViewModel/ProfileViewViewModel.swift
index 1e474f3c..b505d05f 100644
--- a/PingPong/Projects/Feature/Profile/Sources/UI/View/ViewModel/ProfileViewViewModel.swift
+++ b/PingPong/Projects/Feature/Profile/Sources/UI/View/ViewModel/ProfileViewViewModel.swift
@@ -31,7 +31,8 @@ public class ProfileViewViewModel: ObservableObject {
@Published var selectWithDrawPOPUP: Bool = false
@Published var changeNickNameView: Bool = false
@Published var changeNickNameSuccessPOPUP: Bool = false
- @Published public var changeNickName: String = " "
+ @Published public var changeNickName: String = ""
+ @Published public var changeNickImage: String = ""
@AppStorage("selectedChangeTimeView") public var selectedChangeTimeView: Bool = false
@AppStorage("saveDate") public var saveDate: String = ""
@@ -149,6 +150,24 @@ public class ProfileViewViewModel: ObservableObject {
})
}
+ public func chnageImage() {
+ switch self.randomNickName {
+ case "바삭바삭 명언제과":
+ changeNickImage = "crunchyNickname"
+ case "포근포근 명언베이커리":
+ changeNickImage = "cozyNickName"
+ case "퐁실퐁실 명언빵집":
+ changeNickImage = "pomsilNickname"
+ case "모락모락 명언빵공장":
+ changeNickImage = "morakNickname"
+ case "보들보들 명언제빵소":
+ changeNickImage = "softNickName"
+
+ default:
+ break
+ }
+ }
+
public func commCodeToViewModel(_ list: CommonCdModel) {
self.commonCodeModel = list
}