From d0c77dcf3dfc7a1d90b52f03066ca896ffec45f7 Mon Sep 17 00:00:00 2001 From: JaeSunEo Date: Wed, 21 Jan 2026 02:15:32 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20#123=20textField=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Cherrish-iOS/Data/Network/EndPoint/OnboardingAPI.swift | 2 +- .../Components/CherrishTextField/CherrishTextField.swift | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cherrish-iOS/Cherrish-iOS/Data/Network/EndPoint/OnboardingAPI.swift b/Cherrish-iOS/Cherrish-iOS/Data/Network/EndPoint/OnboardingAPI.swift index 79a3c077..0986c70c 100644 --- a/Cherrish-iOS/Cherrish-iOS/Data/Network/EndPoint/OnboardingAPI.swift +++ b/Cherrish-iOS/Cherrish-iOS/Data/Network/EndPoint/OnboardingAPI.swift @@ -41,7 +41,7 @@ enum OnboardingAPI: EndPoint { return JSONEncoding.default } - var queryParameters: [String: String]? { + var queryParameters: [String: Any]? { return nil } diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/CherrishTextField/CherrishTextField.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/CherrishTextField/CherrishTextField.swift index a641fc67..d541074c 100644 --- a/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/CherrishTextField/CherrishTextField.swift +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/CherrishTextField/CherrishTextField.swift @@ -79,7 +79,7 @@ enum CherrishTextFieldStyle { case .plain, .number: return 16.adjustedW case .date: - return 18.5.adjustedW + return 0 } } @@ -158,6 +158,7 @@ struct CherrishTextField: View { .tint(style.textColor) } .frame(height: style.fontHeight) + .padding(.horizontal, style.horizontalPadding) } .padding(.vertical, style.verticalPadding) .background { From c2022b3550a286caa5c8e584f8cbf3b8a1a2f735 Mon Sep 17 00:00:00 2001 From: soseoyo12 Date: Wed, 21 Jan 2026 02:26:01 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20#123=20=EB=82=98=EC=9D=B4=20?= =?UTF-8?q?=ED=85=8D=EC=8A=A4=ED=8A=B8=ED=95=84=EB=93=9C=EC=97=90=20?= =?UTF-8?q?=ED=8F=AC=EC=BB=A4=EC=8A=A4=20=ED=95=B4=EC=A0=9C=EC=8B=9C=20"?= =?UTF-8?q?=EC=84=B8"=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Feature/Onboarding/InformationView.swift | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/InformationView.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/InformationView.swift index fdaf73b9..3f973fcc 100644 --- a/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/InformationView.swift +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/InformationView.swift @@ -23,8 +23,13 @@ struct InformationView: View { name.count > 7 } + private var ageNumericValue: Int? { + let numericString = age.replacingOccurrences(of: " 세", with: "") + return Int(numericString) + } + private var isAgeOverLimit: Bool { - guard let ageValue = Int(age) else { return false } + guard let ageValue = ageNumericValue else { return false } return ageValue > 100 } @@ -54,10 +59,10 @@ struct InformationView: View { .offset(y: 24.adjustedH) } } - .padding(.top, 70.adjustedH) + .padding(.top, 70.adjustedH) .padding(.horizontal, 34.adjustedW) - CherrishTextBox(title: "나이",text: $age, placeholder: "20", isNumberField: true) + CherrishTextBox(title: "나이",text: $age, placeholder: "20 세", isNumberField: true) .focused($isAgeFocused) .overlay(alignment: .bottomLeading) { if showAgeError { @@ -78,7 +83,7 @@ struct InformationView: View { trailingIcon: nil ) { Task { - guard let ageValue = Int(age) else { return } + guard let ageValue = ageNumericValue else { return } await viewModel.createProfile(name: name, age: ageValue) } } @@ -95,6 +100,9 @@ struct InformationView: View { .onChange(of: age) { _ in updateButtonState() } .onChange(of: isAgeFocused) { focused in if !focused { + if let numericValue = ageNumericValue, !age.hasSuffix(" 세") { + age = "\(numericValue) 세" + } showAgeError = isAgeOverLimit } }