From 87923c873542b2a07d94825cb63d2d323733a933 Mon Sep 17 00:00:00 2001 From: kitcat-s Date: Tue, 28 Oct 2025 11:16:25 +0900 Subject: [PATCH 01/15] =?UTF-8?q?feat:=20RoundedButton=EC=97=90=20?= =?UTF-8?q?=EC=95=84=EC=9D=B4=EC=BD=98=20=ED=9A=8C=EC=A0=84=20=EC=95=A0?= =?UTF-8?q?=EB=8B=88=EB=A9=94=EC=9D=B4=EC=85=98=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iCo/Features/Base/RoundedButton.swift | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/AIProject/iCo/Features/Base/RoundedButton.swift b/AIProject/iCo/Features/Base/RoundedButton.swift index ee3bbe63..08b089ff 100644 --- a/AIProject/iCo/Features/Base/RoundedButton.swift +++ b/AIProject/iCo/Features/Base/RoundedButton.swift @@ -8,30 +8,42 @@ import SwiftUI struct RoundedButton: View { + @State private var isRotated: Bool = false + var title: String? var imageName: String? var foregroundColor: Color? + var rotatingAnimation: Bool = false /// 버튼이 눌렸을 때 실행될 액션 /// /// 외부에서 이 버튼을 사용할 때 실행하고자 하는 동작을 이 클로저로 전달 /// 예: 버튼 클릭 시 네비게이션 이동, 토글, API 호출 등. - var action: () -> Void + var action: (() -> Void) var body: some View { - Button(action: action) { + Button { + action() + if rotatingAnimation { + isRotated.toggle() + } + } label: { HStack(spacing: 4) { if let title { Text(title) - .font(.ico12) + .font(.ico11) .tint(foregroundColor ?? .iCoLabel) } if let imageName { Image(systemName: imageName) .font(.ico10) - .tint(foregroundColor ?? .iCoLabel) - + .tint(foregroundColor ?? .iCoLabelSecondary) + .rotation3DEffect( + .degrees(isRotated ? 180 : 0), + axis: (x: 1, y: 0, z: 0) // Y축 기준 회전 + ) + .animation(.smooth, value: isRotated) } } .padding(.horizontal, 10) @@ -55,6 +67,7 @@ struct RoundedButton: View { .disabled(true) RoundedButton(title: "Text Only", imageName: nil, action: { }) RoundedButton(title: nil, imageName: "xmark", action: { }) + RoundedButton(title: "확장", imageName: "chevron.down", rotatingAnimation: true, action: { }) } .padding() .background(.iCoBackground) From 96524d724875425769ddc85192e5c16874dceab5 Mon Sep 17 00:00:00 2001 From: kitcat-s Date: Tue, 28 Oct 2025 12:31:35 +0900 Subject: [PATCH 02/15] =?UTF-8?q?design:=20=EC=83=88=EB=A1=9C=EC=9A=B4=20?= =?UTF-8?q?=EC=83=89=EC=83=81=20=EC=A0=81=EC=9A=A9=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ICoNegative2.colorset/Contents.json | 38 +++++++++++++++++++ .../ICoNeutral2.colorset/Contents.json | 38 +++++++++++++++++++ .../ICoPositive2.colorset/Contents.json | 38 +++++++++++++++++++ .../Image.imageset/Contents.json | 20 ++++++++++ .../Domain/Model/Dashboard/FearGreed.swift | 10 ++--- 5 files changed, 139 insertions(+), 5 deletions(-) create mode 100644 AIProject/iCo/App/Resource/Assets.xcassets/ICoNegative2.colorset/Contents.json create mode 100644 AIProject/iCo/App/Resource/Assets.xcassets/ICoNeutral2.colorset/Contents.json create mode 100644 AIProject/iCo/App/Resource/Assets.xcassets/ICoPositive2.colorset/Contents.json create mode 100644 AIProject/iCo/App/Resource/Assets.xcassets/Image.imageset/Contents.json diff --git a/AIProject/iCo/App/Resource/Assets.xcassets/ICoNegative2.colorset/Contents.json b/AIProject/iCo/App/Resource/Assets.xcassets/ICoNegative2.colorset/Contents.json new file mode 100644 index 00000000..e0a6b9a5 --- /dev/null +++ b/AIProject/iCo/App/Resource/Assets.xcassets/ICoNegative2.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.945", + "green" : "0.498", + "red" : "0.357" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.784", + "green" : "0.416", + "red" : "0.298" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/AIProject/iCo/App/Resource/Assets.xcassets/ICoNeutral2.colorset/Contents.json b/AIProject/iCo/App/Resource/Assets.xcassets/ICoNeutral2.colorset/Contents.json new file mode 100644 index 00000000..2e62a14d --- /dev/null +++ b/AIProject/iCo/App/Resource/Assets.xcassets/ICoNeutral2.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.890", + "green" : "0.408", + "red" : "0.714" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.890", + "green" : "0.408", + "red" : "0.714" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/AIProject/iCo/App/Resource/Assets.xcassets/ICoPositive2.colorset/Contents.json b/AIProject/iCo/App/Resource/Assets.xcassets/ICoPositive2.colorset/Contents.json new file mode 100644 index 00000000..17d34ade --- /dev/null +++ b/AIProject/iCo/App/Resource/Assets.xcassets/ICoPositive2.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0.675", + "green" : "0.431", + "red" : "0.824" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0.584", + "green" : "0.374", + "red" : "0.714" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/AIProject/iCo/App/Resource/Assets.xcassets/Image.imageset/Contents.json b/AIProject/iCo/App/Resource/Assets.xcassets/Image.imageset/Contents.json new file mode 100644 index 00000000..a19a5492 --- /dev/null +++ b/AIProject/iCo/App/Resource/Assets.xcassets/Image.imageset/Contents.json @@ -0,0 +1,20 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/AIProject/iCo/Domain/Model/Dashboard/FearGreed.swift b/AIProject/iCo/Domain/Model/Dashboard/FearGreed.swift index 60eca754..4db3b540 100644 --- a/AIProject/iCo/Domain/Model/Dashboard/FearGreed.swift +++ b/AIProject/iCo/Domain/Model/Dashboard/FearGreed.swift @@ -22,15 +22,15 @@ enum FearGreed: String { var color: Color { switch self { case .extremeFear: - return .red + return .iCoNegative case .fear: - return .orange + return .iCoNegative2 case .neutral: - return .yellow + return .iCoNeutral2 case .greed: - return .green + return .iCoPositive2 case .extremeGreed: - return .mint + return .iCoPositive } } From a730cbd9795b6eccd5e5c6d1d54b710c2b267532 Mon Sep 17 00:00:00 2001 From: kitcat-s Date: Tue, 28 Oct 2025 12:36:09 +0900 Subject: [PATCH 03/15] =?UTF-8?q?design:=20=EA=B3=B5=ED=8F=AC=20=ED=83=90?= =?UTF-8?q?=EC=9A=95=20=EC=84=A4=EB=AA=85=20Toggle=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dashboard/View/AIBriefingView.swift | 6 +-- .../Dashboard/View/FearGreedView.swift | 50 +++++++++++++++---- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift b/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift index 9e3a9b63..7ce5c0c9 100644 --- a/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift +++ b/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift @@ -26,10 +26,12 @@ struct AIBriefingView: View { } var body: some View { - SubheaderView(subheading: "새로운 소식들이 있어요") + SubheaderView(subheading: "시장 한눈에 보기") .padding(.bottom, 4) VStack(alignment: .leading, spacing: 20) { + FearGreedView() + Text(String.aiGeneratedContentNotice) .font(.ico11) .foregroundStyle(.iCoNeutral) @@ -51,8 +53,6 @@ struct AIBriefingView: View { maxHeight = value } } - - FearGreedView() } } .padding(.horizontal, 16) diff --git a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift index 3c401469..3dd72883 100644 --- a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift +++ b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift @@ -13,27 +13,51 @@ import SwiftUI struct FearGreedView: View { @Environment(\.colorScheme) private var colorScheme @StateObject private var viewModel: FearGreedViewModel = FearGreedViewModel() + @State private var showFearGreedDescription: Bool = false private static let cornerRadius: CGFloat = 20 var body: some View { - HStack(alignment: .center, spacing: 16) { - VStack(alignment: .leading, spacing: 8) { - Text("공포 & 탐욕 지수") - .font(.ico19B) + VStack { + HStack(alignment: .center, spacing: 16) { + VStack(alignment: .leading, spacing: 4) { + Group { + Text("지금 시장은") + + HStack(spacing: 4) { + Text(viewModel.classification) + .foregroundStyle(viewModel.fearGreed.color) + + Text("상태에요") + } + } + .font(.ico16B) .foregroundStyle(.iCoLabel) + + RoundedButton(title: "공포 탐욕 지수란?", imageName: "chevron.down", rotatingAnimation: true) { + showFearGreedDescription.toggle() + } + .fixedSize(horizontal: false, vertical: true) + .padding(.top, .spacingXSmall) + .offset(x: -4) + } + + Spacer() - Text("ⓘ Fear & Greed 지수는 투자 심리를 0~100 사이 수치로 나타낸 지표로, 0에 가까울수록 불안감으로 투자를 피하는 '공포', 100에 가까울수록 낙관적으로 적극 매수하는 '탐욕'을 의미합니다.".byCharWrapping) + ChartView(viewModel: viewModel) + .frame(width: 90, height: 90) + } + + if showFearGreedDescription { + Text("공포 탐욕 지수는 투자 심리를 0~100 사이 수치로 나타낸 지표로, 0에 가까울수록 불안감으로 투자를 피하는 '공포', 100에 가까울수록 낙관적으로 적극 매수하는 '탐욕'을 의미합니다.".byCharWrapping) .font(.ico11) - .foregroundStyle(.iCoLabelSecondary) + .foregroundStyle(.iCoLabel) .lineSpacing(3) .fixedSize(horizontal: false, vertical: true) + .padding(.top, 8) + .opacity(!showFearGreedDescription ? 0 : 1) + .animation(.snappy(duration: 0.2), value: showFearGreedDescription) } - - Spacer() - - ChartView(viewModel: viewModel) - .frame(width: 90, height: 90) } .padding(.horizontal, 22) .padding(.vertical, 20) @@ -43,6 +67,7 @@ struct FearGreedView: View { RoundedRectangle(cornerRadius: Self.cornerRadius) .strokeBorder(.defaultGradient, lineWidth: 0.5) ) + .animation(.snappy(duration: 0.2), value: showFearGreedDescription) } } @@ -104,4 +129,7 @@ extension FearGreedView { #Preview { FearGreedView() + .environmentObject(ThemeManager()) + + Spacer() } From 9f0d85ebce075ce1c626d264ad7b9ec780f4f724 Mon Sep 17 00:00:00 2001 From: kitcat Date: Wed, 29 Oct 2025 23:33:44 +0900 Subject: [PATCH 04/15] =?UTF-8?q?design:=20=EC=A3=BC=EC=9A=94=20=EC=BB=A4?= =?UTF-8?q?=EB=AE=A4=EB=8B=88=ED=8B=B0=EC=9D=98=20=EB=B6=84=EC=9C=84?= =?UTF-8?q?=EA=B8=B0=20=EC=A0=9C=EA=B1=B0=20+=20AI=20=EC=BB=A8=ED=85=90?= =?UTF-8?q?=EC=B8=A0=20=EA=B3=A0=EC=A7=80=20=EB=AC=B8=EA=B5=AC=20=EC=9C=84?= =?UTF-8?q?=EC=B9=98=20=EB=B3=80=EA=B2=BD=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iCo/Features/Base/ReportSectionView.swift | 5 +++++ .../Dashboard/View/AIBriefingView.swift | 5 ----- .../Dashboard/ViewModel/InsightViewModel.swift | 18 +++++++++--------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/AIProject/iCo/Features/Base/ReportSectionView.swift b/AIProject/iCo/Features/Base/ReportSectionView.swift index 202eecd9..8943e302 100644 --- a/AIProject/iCo/Features/Base/ReportSectionView.swift +++ b/AIProject/iCo/Features/Base/ReportSectionView.swift @@ -91,6 +91,11 @@ struct ReportSectionView: View { data.onCancel() } case .success(let value): + Text(String.aiGeneratedContentNotice) + .font(.ico11) + .foregroundStyle(.iCoNeutral) + .lineSpacing(5) + content(value) .font(.ico14) .foregroundStyle(.iCoLabel) diff --git a/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift b/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift index 7ce5c0c9..9ea2b0dd 100644 --- a/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift +++ b/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift @@ -32,11 +32,6 @@ struct AIBriefingView: View { VStack(alignment: .leading, spacing: 20) { FearGreedView() - Text(String.aiGeneratedContentNotice) - .font(.ico11) - .foregroundStyle(.iCoNeutral) - .lineSpacing(5) - VStack(spacing: 16) { if isPadLayout { HStack(spacing: 16) { diff --git a/AIProject/iCo/Features/Dashboard/ViewModel/InsightViewModel.swift b/AIProject/iCo/Features/Dashboard/ViewModel/InsightViewModel.swift index 50d925be..0d2c6c97 100644 --- a/AIProject/iCo/Features/Dashboard/ViewModel/InsightViewModel.swift +++ b/AIProject/iCo/Features/Dashboard/ViewModel/InsightViewModel.swift @@ -141,15 +141,15 @@ extension InsightViewModel { extension InsightViewModel { var sectionDataSource: [ReportSectionData] { [ - ReportSectionData( - id: "overall", - icon: "bitcoinsign.bank.building", - title: "전반적인 시장의 분위기", - state: overall, - timestamp: Date.dateAndTimeFormatter.date(from: cacheBriefTodayTimestamp), - onCancel: { [weak self] in self?.cancelOverall() }, - onRetry: { [weak self] in self?.retryOverall() } - ), +// ReportSectionData( +// id: "overall", +// icon: "bitcoinsign.bank.building", +// title: "전반적인 시장의 분위기", +// state: overall, +// timestamp: Date.dateAndTimeFormatter.date(from: cacheBriefTodayTimestamp), +// onCancel: { [weak self] in self?.cancelOverall() }, +// onRetry: { [weak self] in self?.retryOverall() } +// ), ReportSectionData( id: "community", icon: "shareplay", From 237edc654d6071f1bf5b9d9dfca6212bce7d45ec Mon Sep 17 00:00:00 2001 From: kitcat-s Date: Wed, 29 Oct 2025 11:38:44 +0900 Subject: [PATCH 05/15] =?UTF-8?q?design:=20=EB=B3=80=EA=B2=BD=EB=90=9C=20?= =?UTF-8?q?=EB=94=94=EC=9E=90=EC=9D=B8=20=EC=A0=81=EC=9A=A9=ED=95=98?= =?UTF-8?q?=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dashboard/View/FearGreedView.swift | 66 ++++++++++++------- 1 file changed, 42 insertions(+), 24 deletions(-) diff --git a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift index 3dd72883..85b9d91b 100644 --- a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift +++ b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift @@ -19,7 +19,7 @@ struct FearGreedView: View { var body: some View { VStack { - HStack(alignment: .center, spacing: 16) { + HStack(alignment: .center, spacing: 0) { VStack(alignment: .leading, spacing: 4) { Group { Text("지금 시장은") @@ -29,6 +29,8 @@ struct FearGreedView: View { .foregroundStyle(viewModel.fearGreed.color) Text("상태에요") + + Spacer() } } .font(.ico16B) @@ -37,15 +39,30 @@ struct FearGreedView: View { RoundedButton(title: "공포 탐욕 지수란?", imageName: "chevron.down", rotatingAnimation: true) { showFearGreedDescription.toggle() } - .fixedSize(horizontal: false, vertical: true) + .fixedSize(horizontal: true, vertical: false) .padding(.top, .spacingXSmall) .offset(x: -4) } + .frame(maxWidth: .infinity) Spacer() - ChartView(viewModel: viewModel) - .frame(width: 90, height: 90) + HStack(alignment: .bottom, spacing: .spacingSmall) { + Group { + Text("0") + .offset(y: 4) + + ChartView(viewModel: viewModel) + .frame(width: 100, height: 50) + + Text("100") + .offset(y: 6) + } + .font(.ico10M) + .foregroundStyle(.secondary) + } + .fixedSize(horizontal: true, vertical: false) + .frame(maxWidth: .infinity) } if showFearGreedDescription { @@ -54,7 +71,6 @@ struct FearGreedView: View { .foregroundStyle(.iCoLabel) .lineSpacing(3) .fixedSize(horizontal: false, vertical: true) - .padding(.top, 8) .opacity(!showFearGreedDescription ? 0 : 1) .animation(.snappy(duration: 0.2), value: showFearGreedDescription) } @@ -83,9 +99,9 @@ extension FearGreedView { fileprivate struct ChartView: View { @ObservedObject private var viewModel: FearGreedViewModel - private static let gaugeTrim: CGFloat = 0.75 + private static let gaugeTrim: CGFloat = 0.5 private static let lineWidth: CGFloat = 13 - private static let rotationDegrees: Double = 135 + private static let rotationDegrees: Double = 180 init(viewModel: FearGreedViewModel) { self._viewModel = ObservedObject(wrappedValue: viewModel) @@ -98,29 +114,30 @@ extension FearGreedView { ZStack { Circle() .trim(from: 0.0, to: Self.gaugeTrim) - .stroke(Color.iCoBackground, style: StrokeStyle(lineWidth: Self.lineWidth, lineCap: .round)) + .stroke(Color(uiColor: UIColor.systemBackground), + style: StrokeStyle(lineWidth: Self.lineWidth, lineCap: .round) + ) .rotationEffect(.degrees(Self.rotationDegrees)) + .frame(height: size.height * 2) + .shadow(color: .iCoLabel.opacity(0.1), radius: 10) Circle() .trim(from: 0.0, to: Self.gaugeTrim * viewModel.indexValue / 100) - .stroke(viewModel.fearGreed.color, style: StrokeStyle(lineWidth: Self.lineWidth, lineCap: .round)) + .stroke( + LinearGradient( + colors: [FearGreed.extremeFear.color, FearGreed.neutral.color, FearGreed.extremeGreed.color], + startPoint: .trailing, + endPoint: .leading + ), + style: StrokeStyle(lineWidth: Self.lineWidth, lineCap: .round) + ) .rotationEffect(.degrees(Self.rotationDegrees)) - VStack(spacing: size.height * 0.15) { - Text("\(Int(viewModel.indexValue))") - .font(.dynamic(size: size.width * 0.3, weight: .bold)) - .foregroundColor(.iCoLabel) - .minimumScaleFactor(0.5) - - Text(viewModel.classification) - .font(.dynamic(size: size.width * 0.15, weight: .semibold)) - .foregroundStyle(viewModel.fearGreed.color) - .padding(.top, size.height * 0.01) - .frame(maxWidth: size.width * 0.6) - .multilineTextAlignment(.center) - .minimumScaleFactor(0.5) - } - .offset(y: size.height * 0.15) + Text("\(Int(viewModel.indexValue))") + .font(.dynamic(size: size.width * 0.3, weight: .bold)) + .foregroundColor(.iCoLabel) + .minimumScaleFactor(0.5) + .offset(y: -size.height * 0.15) } } } @@ -130,6 +147,7 @@ extension FearGreedView { #Preview { FearGreedView() .environmentObject(ThemeManager()) + .padding(16) Spacer() } From 0ddf2cb9650a4a26da36b1d7dbcf02cb58f9b10f Mon Sep 17 00:00:00 2001 From: kitcat-s Date: Wed, 29 Oct 2025 12:18:18 +0900 Subject: [PATCH 06/15] =?UTF-8?q?feat:=20typeSize=EC=97=90=20=EB=94=B0?= =?UTF-8?q?=EB=9D=BC=20=EC=B0=A8=ED=8A=B8=20=ED=81=AC=EA=B8=B0=20=EB=B3=B4?= =?UTF-8?q?=EC=A0=95=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dashboard/View/FearGreedView.swift | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift index 85b9d91b..1083f278 100644 --- a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift +++ b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift @@ -12,10 +12,24 @@ import SwiftUI /// 왼쪽에는 지표 설명 텍스트를, 오른쪽에는 `ChartView`를 배치합니다. struct FearGreedView: View { @Environment(\.colorScheme) private var colorScheme + @Environment(\.dynamicTypeSize) var typeSize + @StateObject private var viewModel: FearGreedViewModel = FearGreedViewModel() @State private var showFearGreedDescription: Bool = false private static let cornerRadius: CGFloat = 20 + private var chartWidth: CGFloat { + let baseWidth: CGFloat = 100 + + switch typeSize { + case .xSmall, .small, .medium, .large: + return baseWidth + case .xLarge, .xxLarge, .xxxLarge: + return baseWidth * 0.9 + default: + return baseWidth * 0.7 + } + } var body: some View { VStack { @@ -53,8 +67,8 @@ struct FearGreedView: View { .offset(y: 4) ChartView(viewModel: viewModel) - .frame(width: 100, height: 50) - + .frame(width: chartWidth, height: chartWidth / 2) + Text("100") .offset(y: 6) } From 2b848c4f988fc52d7b39fee8a3f31b326cfb9b1f Mon Sep 17 00:00:00 2001 From: kitcat-s Date: Wed, 29 Oct 2025 12:19:57 +0900 Subject: [PATCH 07/15] =?UTF-8?q?refactor:=20GeometryReader=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dashboard/View/FearGreedView.swift | 66 ++++++++++--------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift index 1083f278..a776f02d 100644 --- a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift +++ b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift @@ -66,7 +66,7 @@ struct FearGreedView: View { Text("0") .offset(y: 4) - ChartView(viewModel: viewModel) + ChartView(viewModel: viewModel, chartWidth: chartWidth) .frame(width: chartWidth, height: chartWidth / 2) Text("100") @@ -117,43 +117,45 @@ extension FearGreedView { private static let lineWidth: CGFloat = 13 private static let rotationDegrees: Double = 180 - init(viewModel: FearGreedViewModel) { + let chartWidth: CGFloat + let chartHeight: CGFloat + + init(viewModel: FearGreedViewModel, chartWidth: CGFloat) { self._viewModel = ObservedObject(wrappedValue: viewModel) + self.chartWidth = chartWidth + self.chartHeight = chartWidth / 2 } var body: some View { - GeometryReader { geometry in - let size = geometry.size + ZStack { + Circle() + .trim(from: 0.0, to: Self.gaugeTrim) + .stroke(Color(uiColor: UIColor.systemBackground), + style: StrokeStyle(lineWidth: Self.lineWidth, lineCap: .round)) + .rotationEffect(.degrees(Self.rotationDegrees)) + .frame(height: chartHeight * 2) + .shadow(color: .iCoLabel.opacity(0.1), radius: 10) - ZStack { - Circle() - .trim(from: 0.0, to: Self.gaugeTrim) - .stroke(Color(uiColor: UIColor.systemBackground), - style: StrokeStyle(lineWidth: Self.lineWidth, lineCap: .round) - ) - .rotationEffect(.degrees(Self.rotationDegrees)) - .frame(height: size.height * 2) - .shadow(color: .iCoLabel.opacity(0.1), radius: 10) - - Circle() - .trim(from: 0.0, to: Self.gaugeTrim * viewModel.indexValue / 100) - .stroke( - LinearGradient( - colors: [FearGreed.extremeFear.color, FearGreed.neutral.color, FearGreed.extremeGreed.color], - startPoint: .trailing, - endPoint: .leading - ), - style: StrokeStyle(lineWidth: Self.lineWidth, lineCap: .round) - ) - .rotationEffect(.degrees(Self.rotationDegrees)) - - Text("\(Int(viewModel.indexValue))") - .font(.dynamic(size: size.width * 0.3, weight: .bold)) - .foregroundColor(.iCoLabel) - .minimumScaleFactor(0.5) - .offset(y: -size.height * 0.15) - } + Circle() + .trim(from: 0.0, to: Self.gaugeTrim * viewModel.indexValue / 100) + .stroke( + LinearGradient( + colors: [FearGreed.extremeFear.color, FearGreed.neutral.color, FearGreed.extremeGreed.color], + startPoint: .trailing, + endPoint: .leading + ), + style: StrokeStyle(lineWidth: Self.lineWidth, lineCap: .round) + ) + .rotationEffect(.degrees(Self.rotationDegrees)) + .frame(height: chartHeight * 2) + + Text("\(Int(viewModel.indexValue))") + .font(.dynamic(size: chartWidth * 0.3, weight: .bold)) + .foregroundColor(.iCoLabel) + .minimumScaleFactor(0.5) + .offset(y: -chartHeight * 0.2) } + .offset(y: chartHeight / 2) } } } From 23bf7ccbdf40e7373c04b2cae1056565aea918a9 Mon Sep 17 00:00:00 2001 From: kitcat-s Date: Wed, 29 Oct 2025 14:16:53 +0900 Subject: [PATCH 08/15] =?UTF-8?q?design:=20=EC=B0=A8=ED=8A=B8=20=EB=94=94?= =?UTF-8?q?=EC=9E=90=EC=9D=B8=20=EC=A1=B0=EC=A0=95=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iCo/Features/Dashboard/View/FearGreedView.swift | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift index a776f02d..90afc464 100644 --- a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift +++ b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift @@ -19,7 +19,7 @@ struct FearGreedView: View { private static let cornerRadius: CGFloat = 20 private var chartWidth: CGFloat { - let baseWidth: CGFloat = 100 + let baseWidth: CGFloat = 110 switch typeSize { case .xSmall, .small, .medium, .large: @@ -54,7 +54,7 @@ struct FearGreedView: View { showFearGreedDescription.toggle() } .fixedSize(horizontal: true, vertical: false) - .padding(.top, .spacingXSmall) + .padding(.top, 8) .offset(x: -4) } .frame(maxWidth: .infinity) @@ -82,6 +82,7 @@ struct FearGreedView: View { if showFearGreedDescription { Text("공포 탐욕 지수는 투자 심리를 0~100 사이 수치로 나타낸 지표로, 0에 가까울수록 불안감으로 투자를 피하는 '공포', 100에 가까울수록 낙관적으로 적극 매수하는 '탐욕'을 의미합니다.".byCharWrapping) .font(.ico11) + .padding(.top, 4) .foregroundStyle(.iCoLabel) .lineSpacing(3) .fixedSize(horizontal: false, vertical: true) @@ -114,7 +115,7 @@ extension FearGreedView { @ObservedObject private var viewModel: FearGreedViewModel private static let gaugeTrim: CGFloat = 0.5 - private static let lineWidth: CGFloat = 13 + private static let lineWidth: CGFloat = 10 private static let rotationDegrees: Double = 180 let chartWidth: CGFloat @@ -134,7 +135,7 @@ extension FearGreedView { style: StrokeStyle(lineWidth: Self.lineWidth, lineCap: .round)) .rotationEffect(.degrees(Self.rotationDegrees)) .frame(height: chartHeight * 2) - .shadow(color: .iCoLabel.opacity(0.1), radius: 10) + .shadow(color: .black.opacity(0.15), radius: 5) Circle() .trim(from: 0.0, to: Self.gaugeTrim * viewModel.indexValue / 100) @@ -150,7 +151,7 @@ extension FearGreedView { .frame(height: chartHeight * 2) Text("\(Int(viewModel.indexValue))") - .font(.dynamic(size: chartWidth * 0.3, weight: .bold)) + .font(.ico24B) .foregroundColor(.iCoLabel) .minimumScaleFactor(0.5) .offset(y: -chartHeight * 0.2) From 16311914f6e1a60a45b186e5b3fb6b6f811a0db8 Mon Sep 17 00:00:00 2001 From: kitcat-s Date: Wed, 29 Oct 2025 14:43:07 +0900 Subject: [PATCH 09/15] =?UTF-8?q?refactor:=20FearGreedView=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dashboard/View/FearGreedView.swift | 88 ++++++++++--------- 1 file changed, 48 insertions(+), 40 deletions(-) diff --git a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift index 90afc464..e9ade1af 100644 --- a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift +++ b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift @@ -34,49 +34,14 @@ struct FearGreedView: View { var body: some View { VStack { HStack(alignment: .center, spacing: 0) { - VStack(alignment: .leading, spacing: 4) { - Group { - Text("지금 시장은") - - HStack(spacing: 4) { - Text(viewModel.classification) - .foregroundStyle(viewModel.fearGreed.color) - - Text("상태에요") - - Spacer() - } - } - .font(.ico16B) - .foregroundStyle(.iCoLabel) - - RoundedButton(title: "공포 탐욕 지수란?", imageName: "chevron.down", rotatingAnimation: true) { - showFearGreedDescription.toggle() - } - .fixedSize(horizontal: true, vertical: false) - .padding(.top, 8) - .offset(x: -4) - } - .frame(maxWidth: .infinity) + headerSection + .frame(maxWidth: .infinity) Spacer() - HStack(alignment: .bottom, spacing: .spacingSmall) { - Group { - Text("0") - .offset(y: 4) - - ChartView(viewModel: viewModel, chartWidth: chartWidth) - .frame(width: chartWidth, height: chartWidth / 2) - - Text("100") - .offset(y: 6) - } - .font(.ico10M) - .foregroundStyle(.secondary) - } - .fixedSize(horizontal: true, vertical: false) - .frame(maxWidth: .infinity) + chartSection + .fixedSize(horizontal: true, vertical: false) + .frame(maxWidth: .infinity) } if showFearGreedDescription { @@ -100,6 +65,49 @@ struct FearGreedView: View { ) .animation(.snappy(duration: 0.2), value: showFearGreedDescription) } + + var headerSection: some View { + VStack(alignment: .leading, spacing: 4) { + Group { + Text("지금 시장은") + + HStack(spacing: 4) { + Text(viewModel.classification) + .foregroundStyle(viewModel.fearGreed.color) + + Text("상태에요") + + Spacer() + } + } + .font(.ico16B) + .foregroundStyle(.iCoLabel) + + RoundedButton(title: "공포 탐욕 지수란?", imageName: "chevron.down", rotatingAnimation: true) { + showFearGreedDescription.toggle() + } + .fixedSize(horizontal: true, vertical: false) + .padding(.top, 8) + .offset(x: -4) + } + } + + var chartSection: some View { + HStack(alignment: .bottom, spacing: .spacingSmall) { + Group { + Text("0") + .offset(y: 4) + + ChartView(viewModel: viewModel, chartWidth: chartWidth) + .frame(width: chartWidth, height: chartWidth / 2) + + Text("100") + .offset(y: 6) + } + .font(.ico10M) + .foregroundStyle(.secondary) + } + } } extension FearGreedView { From 4abacdb8b2234c77db1a96e6014019f5f6b98a0d Mon Sep 17 00:00:00 2001 From: kitcat Date: Wed, 29 Oct 2025 23:41:34 +0900 Subject: [PATCH 10/15] =?UTF-8?q?feat:=20=EC=95=84=EC=9D=B4=ED=8C=A8?= =?UTF-8?q?=EB=93=9C=20=EB=8C=80=EC=9D=91=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dashboard/View/FearGreedView.swift | 76 +++++++++++++------ 1 file changed, 51 insertions(+), 25 deletions(-) diff --git a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift index e9ade1af..65dd19ee 100644 --- a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift +++ b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift @@ -13,6 +13,7 @@ import SwiftUI struct FearGreedView: View { @Environment(\.colorScheme) private var colorScheme @Environment(\.dynamicTypeSize) var typeSize + @Environment(\.horizontalSizeClass) var hSizeClass @StateObject private var viewModel: FearGreedViewModel = FearGreedViewModel() @State private var showFearGreedDescription: Bool = false @@ -35,24 +36,17 @@ struct FearGreedView: View { VStack { HStack(alignment: .center, spacing: 0) { headerSection - .frame(maxWidth: .infinity) Spacer() chartSection .fixedSize(horizontal: true, vertical: false) - .frame(maxWidth: .infinity) } if showFearGreedDescription { - Text("공포 탐욕 지수는 투자 심리를 0~100 사이 수치로 나타낸 지표로, 0에 가까울수록 불안감으로 투자를 피하는 '공포', 100에 가까울수록 낙관적으로 적극 매수하는 '탐욕'을 의미합니다.".byCharWrapping) - .font(.ico11) - .padding(.top, 4) - .foregroundStyle(.iCoLabel) - .lineSpacing(3) - .fixedSize(horizontal: false, vertical: true) + fearGreedDescription .opacity(!showFearGreedDescription ? 0 : 1) - .animation(.snappy(duration: 0.2), value: showFearGreedDescription) + .animation(.snappy(duration: 0.3), value: showFearGreedDescription) } } .padding(.horizontal, 22) @@ -68,27 +62,50 @@ struct FearGreedView: View { var headerSection: some View { VStack(alignment: .leading, spacing: 4) { - Group { - Text("지금 시장은") - + if hSizeClass == .compact { + VStack(alignment: .leading, spacing: 4) { + Group { + Text("지금 시장은") + + HStack(spacing: 4) { + Text(viewModel.classification) + .foregroundStyle(viewModel.fearGreed.color) + + Text("상태에요") + + Spacer() + } + } + .font(.ico16B) + .foregroundStyle(.iCoLabel) + } + } else { HStack(spacing: 4) { - Text(viewModel.classification) - .foregroundStyle(viewModel.fearGreed.color) - - Text("상태에요") - - Spacer() + Group { + Text("지금 시장은") + + Text(viewModel.classification) + .foregroundStyle(viewModel.fearGreed.color) + + Text("상태에요") + + Spacer() + } + .font(.ico16B) + .foregroundStyle(.iCoLabel) } } - .font(.ico16B) - .foregroundStyle(.iCoLabel) - RoundedButton(title: "공포 탐욕 지수란?", imageName: "chevron.down", rotatingAnimation: true) { - showFearGreedDescription.toggle() + if hSizeClass == .compact { + RoundedButton(title: "공포 탐욕 지수란?", imageName: "chevron.down", rotatingAnimation: true) { + showFearGreedDescription.toggle() + } + .fixedSize(horizontal: true, vertical: false) + .padding(.top, 8) + .offset(x: -4) + } else { + fearGreedDescription } - .fixedSize(horizontal: true, vertical: false) - .padding(.top, 8) - .offset(x: -4) } } @@ -108,6 +125,15 @@ struct FearGreedView: View { .foregroundStyle(.secondary) } } + + var fearGreedDescription: some View { + Text("ⓘ 공포 탐욕 지수는 투자 심리를 0~100 사이 수치로 나타낸 지표로, 0에 가까울수록 불안감으로 투자를 피하는 '공포', 100에 가까울수록 낙관적으로 적극 매수하는 '탐욕'을 의미합니다.".byCharWrapping) + .font(.ico11) + .padding(.top, 4) + .foregroundStyle(.iCoNeutral) + .lineSpacing(5) + .fixedSize(horizontal: false, vertical: true) + } } extension FearGreedView { From f253774c3e2e958939d983232fffc6271f4aa011 Mon Sep 17 00:00:00 2001 From: kitcat-s Date: Tue, 4 Nov 2025 12:07:59 +0900 Subject: [PATCH 11/15] =?UTF-8?q?design:=20=EA=B3=B5=ED=8F=AC=20=ED=83=90?= =?UTF-8?q?=EC=9A=95=20=EA=B7=B8=EB=9E=98=ED=94=84=EC=97=90=20=EC=95=A0?= =?UTF-8?q?=EB=8B=88=EB=A9=94=EC=9D=B4=EC=85=98=20=EC=B6=94=EA=B0=80?= =?UTF-8?q?=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Features/Dashboard/View/FearGreedView.swift | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift index 65dd19ee..d1f95d28 100644 --- a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift +++ b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift @@ -151,6 +151,7 @@ extension FearGreedView { private static let gaugeTrim: CGFloat = 0.5 private static let lineWidth: CGFloat = 10 private static let rotationDegrees: Double = 180 + @State private var guageValue: CGFloat = 0 let chartWidth: CGFloat let chartHeight: CGFloat @@ -163,6 +164,7 @@ extension FearGreedView { var body: some View { ZStack { + // 배경 Circle() .trim(from: 0.0, to: Self.gaugeTrim) .stroke(Color(uiColor: UIColor.systemBackground), @@ -171,8 +173,9 @@ extension FearGreedView { .frame(height: chartHeight * 2) .shadow(color: .black.opacity(0.15), radius: 5) + // 실제 게이지 Circle() - .trim(from: 0.0, to: Self.gaugeTrim * viewModel.indexValue / 100) + .trim(from: 0.0, to: Self.gaugeTrim * (guageValue / 100)) .stroke( LinearGradient( colors: [FearGreed.extremeFear.color, FearGreed.neutral.color, FearGreed.extremeGreed.color], @@ -183,14 +186,23 @@ extension FearGreedView { ) .rotationEffect(.degrees(Self.rotationDegrees)) .frame(height: chartHeight * 2) + .animation(.snappy, value: guageValue) - Text("\(Int(viewModel.indexValue))") + Text(guageValue, format: .number) .font(.ico24B) .foregroundColor(.iCoLabel) .minimumScaleFactor(0.5) .offset(y: -chartHeight * 0.2) + .animation(.snappy, value: guageValue) + .contentTransition(.numericText(countsDown: true)) } .offset(y: chartHeight / 2) + .task { + Task { + try await Task.sleep(for: .seconds(0.5)) + guageValue = viewModel.indexValue + } + } } } } From ead0a5e4017f4d4cd18fda31243586bd46567193 Mon Sep 17 00:00:00 2001 From: kitcat-s Date: Tue, 4 Nov 2025 12:30:23 +0900 Subject: [PATCH 12/15] =?UTF-8?q?design:=20AI=20=EC=BB=A8=ED=85=90?= =?UTF-8?q?=EC=B8=A0=20=EA=B3=A0=EC=A7=80=20=EB=AC=B8=EA=B5=AC=20=EC=9C=84?= =?UTF-8?q?=EC=B9=98=20=EB=B3=80=EA=B2=BD=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AIProject/iCo/Features/Base/ReportSectionView.swift | 5 ----- .../iCo/Features/Dashboard/View/AIBriefingView.swift | 9 ++++++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/AIProject/iCo/Features/Base/ReportSectionView.swift b/AIProject/iCo/Features/Base/ReportSectionView.swift index 8943e302..202eecd9 100644 --- a/AIProject/iCo/Features/Base/ReportSectionView.swift +++ b/AIProject/iCo/Features/Base/ReportSectionView.swift @@ -91,11 +91,6 @@ struct ReportSectionView: View { data.onCancel() } case .success(let value): - Text(String.aiGeneratedContentNotice) - .font(.ico11) - .foregroundStyle(.iCoNeutral) - .lineSpacing(5) - content(value) .font(.ico14) .foregroundStyle(.iCoLabel) diff --git a/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift b/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift index 9ea2b0dd..ce0f7e36 100644 --- a/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift +++ b/AIProject/iCo/Features/Dashboard/View/AIBriefingView.swift @@ -64,7 +64,14 @@ struct AIBriefingView: View { .font(.ico16B) .foregroundStyle($0.sentiment.color(for: themeManager.selectedTheme)) }, - content: { Text($0.summary.byCharWrapping) } + content: { + Text(String.aiGeneratedContentNotice) + .font(.ico11) + .foregroundStyle(.iCoNeutral) + .lineSpacing(5) + + Text($0.summary.byCharWrapping) + } ) .frame(height: maxHeight) } From 0b2b62998b896e5595e6d8e011843cbd9e409c09 Mon Sep 17 00:00:00 2001 From: kitcat-s Date: Tue, 4 Nov 2025 22:33:36 +0900 Subject: [PATCH 13/15] =?UTF-8?q?design:=20=EA=B3=B5=ED=8F=AC=20=ED=83=90?= =?UTF-8?q?=EC=9A=95=20=EC=A7=80=EC=88=98=20=ED=8F=B0=ED=8A=B8=20=ED=81=AC?= =?UTF-8?q?=EA=B8=B0=20=EB=B3=80=EA=B2=BD=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AIProject/iCo/Features/Dashboard/View/FearGreedView.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift index d1f95d28..efe1b2bd 100644 --- a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift +++ b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift @@ -189,9 +189,9 @@ extension FearGreedView { .animation(.snappy, value: guageValue) Text(guageValue, format: .number) - .font(.ico24B) + .font(.dynamic(size: chartWidth / 5)) + .bold() .foregroundColor(.iCoLabel) - .minimumScaleFactor(0.5) .offset(y: -chartHeight * 0.2) .animation(.snappy, value: guageValue) .contentTransition(.numericText(countsDown: true)) From 102cd263de8d6831c3f0e1c03bee2c45d76d464d Mon Sep 17 00:00:00 2001 From: kitcat-s Date: Tue, 4 Nov 2025 22:23:57 +0900 Subject: [PATCH 14/15] =?UTF-8?q?[=ED=94=BC=EB=93=9C=EB=B0=B1]=20=EA=B3=B5?= =?UTF-8?q?=ED=8F=AC=20=ED=83=90=EC=9A=95=20=EC=83=81=ED=83=9C=20=ED=91=9C?= =?UTF-8?q?=EA=B8=B0=20=EA=B0=9C=EC=84=A0=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Features/Dashboard/View/FearGreedView.swift | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift index efe1b2bd..9885d57e 100644 --- a/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift +++ b/AIProject/iCo/Features/Dashboard/View/FearGreedView.swift @@ -63,18 +63,14 @@ struct FearGreedView: View { var headerSection: some View { VStack(alignment: .leading, spacing: 4) { if hSizeClass == .compact { - VStack(alignment: .leading, spacing: 4) { + VStack(alignment: .leading, spacing: 0) { Group { Text("지금 시장은") - HStack(spacing: 4) { - Text(viewModel.classification) - .foregroundStyle(viewModel.fearGreed.color) - - Text("상태에요") + Text(viewModel.classification) + .foregroundStyle(viewModel.fearGreed.color) - Spacer() - } + + Text(" 상태예요") } .font(.ico16B) .foregroundStyle(.iCoLabel) @@ -87,9 +83,7 @@ struct FearGreedView: View { Text(viewModel.classification) .foregroundStyle(viewModel.fearGreed.color) - Text("상태에요") - - Spacer() + + Text(" 상태예요") } .font(.ico16B) .foregroundStyle(.iCoLabel) From ab9869afc1a5cff332e449ace1237e792bec7d75 Mon Sep 17 00:00:00 2001 From: kitcat-s Date: Tue, 4 Nov 2025 22:47:52 +0900 Subject: [PATCH 15/15] =?UTF-8?q?[=ED=94=BC=EB=93=9C=EB=B0=B1]=20rename:?= =?UTF-8?q?=20=EA=B3=B5=ED=8F=AC=20=ED=83=90=EC=9A=95=20=EC=B0=A8=ED=8A=B8?= =?UTF-8?q?=20=EC=97=90=EC=85=8B=20=EC=9D=B4=EB=A6=84=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=ED=95=98=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Contents.json | 0 .../Contents.json | 0 .../Contents.json | 0 AIProject/iCo/Domain/Model/Dashboard/FearGreed.swift | 6 +++--- 4 files changed, 3 insertions(+), 3 deletions(-) rename AIProject/iCo/App/Resource/Assets.xcassets/{ICoNegative2.colorset => ICoNegativeGradient.colorset}/Contents.json (100%) rename AIProject/iCo/App/Resource/Assets.xcassets/{ICoNeutral2.colorset => ICoNeutralGradient.colorset}/Contents.json (100%) rename AIProject/iCo/App/Resource/Assets.xcassets/{ICoPositive2.colorset => ICoPositiveGradient.colorset}/Contents.json (100%) diff --git a/AIProject/iCo/App/Resource/Assets.xcassets/ICoNegative2.colorset/Contents.json b/AIProject/iCo/App/Resource/Assets.xcassets/ICoNegativeGradient.colorset/Contents.json similarity index 100% rename from AIProject/iCo/App/Resource/Assets.xcassets/ICoNegative2.colorset/Contents.json rename to AIProject/iCo/App/Resource/Assets.xcassets/ICoNegativeGradient.colorset/Contents.json diff --git a/AIProject/iCo/App/Resource/Assets.xcassets/ICoNeutral2.colorset/Contents.json b/AIProject/iCo/App/Resource/Assets.xcassets/ICoNeutralGradient.colorset/Contents.json similarity index 100% rename from AIProject/iCo/App/Resource/Assets.xcassets/ICoNeutral2.colorset/Contents.json rename to AIProject/iCo/App/Resource/Assets.xcassets/ICoNeutralGradient.colorset/Contents.json diff --git a/AIProject/iCo/App/Resource/Assets.xcassets/ICoPositive2.colorset/Contents.json b/AIProject/iCo/App/Resource/Assets.xcassets/ICoPositiveGradient.colorset/Contents.json similarity index 100% rename from AIProject/iCo/App/Resource/Assets.xcassets/ICoPositive2.colorset/Contents.json rename to AIProject/iCo/App/Resource/Assets.xcassets/ICoPositiveGradient.colorset/Contents.json diff --git a/AIProject/iCo/Domain/Model/Dashboard/FearGreed.swift b/AIProject/iCo/Domain/Model/Dashboard/FearGreed.swift index 4db3b540..9573d4f7 100644 --- a/AIProject/iCo/Domain/Model/Dashboard/FearGreed.swift +++ b/AIProject/iCo/Domain/Model/Dashboard/FearGreed.swift @@ -24,11 +24,11 @@ enum FearGreed: String { case .extremeFear: return .iCoNegative case .fear: - return .iCoNegative2 + return .iCoNegativeGradient case .neutral: - return .iCoNeutral2 + return .iCoNeutralGradient case .greed: - return .iCoPositive2 + return .iCoPositiveGradient case .extremeGreed: return .iCoPositive }