diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/Contents.json index 23058801..c4e62ea5 100644 --- a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,6 +1,7 @@ { "images" : [ { + "filename" : "app icon.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" @@ -12,6 +13,7 @@ "value" : "dark" } ], + "filename" : "app icon 1.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" @@ -23,6 +25,7 @@ "value" : "tinted" } ], + "filename" : "app icon 2.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/app icon 1.png b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/app icon 1.png new file mode 100644 index 00000000..67eb8951 Binary files /dev/null and b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/app icon 1.png differ diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/app icon 2.png b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/app icon 2.png new file mode 100644 index 00000000..67eb8951 Binary files /dev/null and b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/app icon 2.png differ diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/app icon.png b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/app icon.png new file mode 100644 index 00000000..67eb8951 Binary files /dev/null and b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/app icon.png differ diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/dimColor.colorset/Contents.json b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/dimColor.colorset/Contents.json new file mode 100644 index 00000000..8d260665 --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/dimColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.100", + "blue" : "0x52", + "green" : "0x4C", + "red" : "0x46" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "0.100", + "blue" : "0x52", + "green" : "0x4C", + "red" : "0x46" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Contents.json b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Contents.json new file mode 100644 index 00000000..ba47d6d9 --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Group 2085667406.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Group 2085667406@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Group 2085667406@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Group 2085667406.png b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Group 2085667406.png new file mode 100644 index 00000000..5776a51e Binary files /dev/null and b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Group 2085667406.png differ diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Group 2085667406@2x.png b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Group 2085667406@2x.png new file mode 100644 index 00000000..54f8a305 Binary files /dev/null and b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Group 2085667406@2x.png differ diff --git a/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Group 2085667406@3x.png b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Group 2085667406@3x.png new file mode 100644 index 00000000..58745352 Binary files /dev/null and b/Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Group 2085667406@3x.png differ diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/DowntimeBottomSheetView.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/DowntimeBottomSheetView.swift new file mode 100644 index 00000000..cd44cc45 --- /dev/null +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/DowntimeBottomSheetView.swift @@ -0,0 +1,135 @@ +// +// DowntimeBottomSheetView.swift +// Cherrish-iOS +// +// Created by 이나연 on 1/16/26. +// + +import SwiftUI + +struct DowntimeBottomSheetView: View { + @State var selectedDowntime: Int = 5 + @State var rate: Double = 0.5 + + var body: some View { + VStack(spacing: 0) { + Spacer() + .frame(height: 25.adjustedH) + + TypographyText("개인 다운타임으로 설정해주세요.", style: .title1_sb_18, color: .gray1000) + .frame(height: 27.adjustedH) + .frame(maxWidth: .infinity, alignment: .leading) + .padding(.leading, 25.adjustedH) + + Spacer() + .frame(height: 44.adjustedH) + + speechBubble + + downtimeProgressBar + .padding(.top, 8.adjustedH) + + Spacer() + .frame(height: 25.adjustedH) + + grayLineView + .padding(.horizontal, 25.adjustedW) + + pickerView + + grayLineView + .padding(.horizontal, 25.adjustedW) + + } + } +} + +extension DowntimeBottomSheetView { + private var speechBubble: some View { + ZStack { + Image(.speechBubble) + .resizable() + .scaledToFill() + .frame(height: 53.adjustedH) + + TypographyText("회복 목표디데이로부터 약 7일 전에 안정될 수 있어요.", style: .body1_r_14, color: .gray1000) + .lineLimit(1) + .minimumScaleFactor(0.8) + .padding(.horizontal, 18.adjustedW) + .offset(y: -4.adjustedH) + + } + .padding(.horizontal, 25.adjustedW) + .frame(height: 53.adjustedH) + } + + private var downtimeProgressBar: some View { + VStack { + HStack { + Spacer() + + TypographyText("다운타임 \(selectedDowntime)일", style: .title2_m_16, color: .red600) + + Spacer () + + TypographyText("여유기간 7일", style: .title2_m_16, color: .gray800) + + Spacer() + } + + GeometryReader { geometry in + ZStack(alignment: .leading) { + RoundedRectangle(cornerRadius: 24) + .fill(.gray400) + .frame(height: 8.adjustedH) + + RoundedRectangle(cornerRadius: 24) + .fill(.red600) + .frame( + width: geometry.size.width * rate, + height: 8.adjustedH + ) + .animation(.easeOut(duration: 0.5), value: rate) + } + } + .frame(height: 8.adjustedH) + .padding(.horizontal, 25.adjustedW) + + HStack { + TypographyText("1월 2일", style: .body2_r_13, color: .gray700) + .frame(height: 18.adjustedH) + + Spacer() + + TypographyText("1월 14일", style: .body2_r_13, color: .gray700) + .frame(height: 18.adjustedH) + } + .padding(.horizontal, 25.adjustedW) + } + } + + private var grayLineView: some View { + Rectangle() + .frame(height: 1.adjustedH) + .foregroundColor(.gray400) + } + + private var pickerView: some View { + HStack { + Spacer() + + VStack(spacing: 0) { + TypographyText("다운타임", style: .headline_sb_20, color: .gray1000) + .frame(height: 30.adjustedH) + + TypographyText("보통 3-5일", style: .title2_m_16, color: .gray600) + } + + Spacer() + + CherrishPicker(selection: $selectedDowntime, range: 1...30) + + Spacer() + } + } +} diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/CherrishPicker.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/CherrishPicker.swift index 1a542c7f..7bad6e24 100644 --- a/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/CherrishPicker.swift +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/CherrishPicker.swift @@ -8,7 +8,7 @@ import SwiftUI import UIKit -struct CustomWheelPicker: View { +struct CherrishPicker: View { @Binding var selection: Int let range: ClosedRange var width: CGFloat = 74.adjustedW diff --git a/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/Treatment/TreatmentRowView.swift b/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/Treatment/TreatmentRowView.swift index b0e66ace..3bd3582f 100644 --- a/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/Treatment/TreatmentRowView.swift +++ b/Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/Treatment/TreatmentRowView.swift @@ -105,7 +105,7 @@ private struct TreatmentCheckBoxView: View { isSelected: Binding, isCompleted: Binding, isCompletedView: Bool = false, - action: @escaping () -> Void, + action: @escaping () -> Void ) { self.treatmentEntity = treatmentEntity self._isSelected = isSelected