diff --git a/FiveGuyes/FiveGuyes/Resources/Assets.xcassets/completionGreenFlag.imageset/Contents.json b/FiveGuyes/FiveGuyes/Resources/Assets.xcassets/completionGreenFlag.imageset/Contents.json new file mode 100644 index 0000000..95b0200 --- /dev/null +++ b/FiveGuyes/FiveGuyes/Resources/Assets.xcassets/completionGreenFlag.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "completionGreenFlag.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Group 15@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Group 15@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FiveGuyes/FiveGuyes/Resources/Assets.xcassets/completionGreenFlag.imageset/Group 15@2x.png b/FiveGuyes/FiveGuyes/Resources/Assets.xcassets/completionGreenFlag.imageset/Group 15@2x.png new file mode 100644 index 0000000..f7f1719 Binary files /dev/null and b/FiveGuyes/FiveGuyes/Resources/Assets.xcassets/completionGreenFlag.imageset/Group 15@2x.png differ diff --git a/FiveGuyes/FiveGuyes/Resources/Assets.xcassets/completionGreenFlag.imageset/Group 15@3x.png b/FiveGuyes/FiveGuyes/Resources/Assets.xcassets/completionGreenFlag.imageset/Group 15@3x.png new file mode 100644 index 0000000..c87128d Binary files /dev/null and b/FiveGuyes/FiveGuyes/Resources/Assets.xcassets/completionGreenFlag.imageset/Group 15@3x.png differ diff --git a/FiveGuyes/FiveGuyes/Resources/Assets.xcassets/completionGreenFlag.imageset/completionGreenFlag.png b/FiveGuyes/FiveGuyes/Resources/Assets.xcassets/completionGreenFlag.imageset/completionGreenFlag.png new file mode 100644 index 0000000..0b69920 Binary files /dev/null and b/FiveGuyes/FiveGuyes/Resources/Assets.xcassets/completionGreenFlag.imageset/completionGreenFlag.png differ diff --git a/FiveGuyes/FiveGuyes/Sources/Views/Screen/TotalCalendarView.swift b/FiveGuyes/FiveGuyes/Sources/Views/Screen/TotalCalendarView.swift index 99c74cc..b140283 100644 --- a/FiveGuyes/FiveGuyes/Sources/Views/Screen/TotalCalendarView.swift +++ b/FiveGuyes/FiveGuyes/Sources/Views/Screen/TotalCalendarView.swift @@ -98,17 +98,19 @@ struct TotalCalendarView: View { if let currentReadingBook = currentReadingBook, let readingRecord = currentReadingBook.readingRecords[dateKey] { + let isTodayCompletionDate = Calendar.current.isDate(todayDate, inSameDayAs: currentReadingBook.book.targetEndDate) + if Calendar.current.isDate(date, inSameDayAs: currentReadingBook.book.targetEndDate) { - // TODO: 이미지 교체하기 (마지막날, 아닌 날) - // `targetEndDate` 날짜인 경우 - 특정 이미지를 배경으로 표시 - Image("completionFlag") // 넣고자 하는 이미지 이름으로 대체 + Image(isTodayCompletionDate ? "completionFlagToday" : "completionFlag") .resizable() .scaledToFit() .frame(width: 50, height: 50) .overlay( Text("완독") - .font(.system(size: 13, weight: .semibold)) - .foregroundColor(Color(red: 0.03, green: 0.68, blue: 0.41)) + .font(.system(size: 14, weight: .semibold)) + .foregroundColor(isTodayCompletionDate ? Color.white : Color(red: 0.03, green: 0.68, blue: 0.41)) + .padding(.bottom, 1) + .padding(.leading, 2) ) } else if Calendar.current.isDate(date, inSameDayAs: todayDate) { // 오늘 날짜인 경우 - 초록색 배경에 목표 페이지 수 표시