diff --git a/NotToDo/NotToDo.xcodeproj/project.pbxproj b/NotToDo/NotToDo.xcodeproj/project.pbxproj index 1c937fd..b082c0f 100644 --- a/NotToDo/NotToDo.xcodeproj/project.pbxproj +++ b/NotToDo/NotToDo.xcodeproj/project.pbxproj @@ -42,6 +42,7 @@ 09F695DB296C52B600877EA7 /* MissionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09F695DA296C52B600877EA7 /* MissionTableViewCell.swift */; }; 09F695DD296C52F000877EA7 /* SituationTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09F695DC296C52F000877EA7 /* SituationTableViewCell.swift */; }; 09F695DF296C533200877EA7 /* BackgroundSupplementaryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09F695DE296C533200877EA7 /* BackgroundSupplementaryView.swift */; }; + 3B0155872971512C00E7BBF1 /* CalendarDayCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B0155862971512C00E7BBF1 /* CalendarDayCell.swift */; }; 3B162874295AD7860077AE7B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B162873295AD7860077AE7B /* AppDelegate.swift */; }; 3B162876295AD7860077AE7B /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B162875295AD7860077AE7B /* SceneDelegate.swift */; }; 3B16287D295AD7870077AE7B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3B16287C295AD7870077AE7B /* Assets.xcassets */; }; @@ -178,6 +179,7 @@ 09F695DA296C52B600877EA7 /* MissionTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MissionTableViewCell.swift; sourceTree = ""; }; 09F695DC296C52F000877EA7 /* SituationTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SituationTableViewCell.swift; sourceTree = ""; }; 09F695DE296C533200877EA7 /* BackgroundSupplementaryView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackgroundSupplementaryView.swift; sourceTree = ""; }; + 3B0155862971512C00E7BBF1 /* CalendarDayCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CalendarDayCell.swift; sourceTree = ""; }; 3B162870295AD7860077AE7B /* NotToDo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NotToDo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 3B162873295AD7860077AE7B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 3B162875295AD7860077AE7B /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -396,6 +398,14 @@ path = Achieve; sourceTree = ""; }; + 3B015585297150E400E7BBF1 /* Calendar */ = { + isa = PBXGroup; + children = ( + 3B0155862971512C00E7BBF1 /* CalendarDayCell.swift */, + ); + path = Calendar; + sourceTree = ""; + }; 3B162867295AD7860077AE7B = { isa = PBXGroup; children = ( @@ -781,6 +791,7 @@ 3B5B34A729617D3C002E1161 /* Common */ = { isa = PBXGroup; children = ( + 3B015585297150E400E7BBF1 /* Calendar */, 3B59AFB429633DE40050FF49 /* ActionSheet */, 6CF0427629633E0E000F40EB /* NavigationBarView */, 3B5B34A829617D6A002E1161 /* NotTodoButton */, @@ -1210,6 +1221,7 @@ 3BEF92AF29686A8E0090A290 /* HomeCalendarCollectionViewCell.swift in Sources */, 096BE0172966A142009ED396 /* CustomTabBarCell.swift in Sources */, 3BE07017296F44D3002CC50A /* MyInfoViewController.swift in Sources */, + 3B0155872971512C00E7BBF1 /* CalendarDayCell.swift in Sources */, 3BE07006296F43A2002CC50A /* UIStackView+.swift in Sources */, 3BBE56E5296C213900771DE4 /* StartOnboardingView.swift in Sources */, 3BE07005296F43A2002CC50A /* UIColor+.swift in Sources */, diff --git a/NotToDo/NotToDo/Presentation/Common/Calendar/CalendarDayCell.swift b/NotToDo/NotToDo/Presentation/Common/Calendar/CalendarDayCell.swift new file mode 100644 index 0000000..9292e64 --- /dev/null +++ b/NotToDo/NotToDo/Presentation/Common/Calendar/CalendarDayCell.swift @@ -0,0 +1,54 @@ +// +// CalendarDayCell.swift +// NotToDo +// +// Created by 강윤서 on 2023/01/13. +// + +import UIKit + +import FSCalendar + +enum BackgroundType: Int { + case today + case none +} + +final class CalendarDayCell: FSCalendarCell { + + // MARK: - Properties + + weak var dayBackView: UIView! + var backgroundType: BackgroundType = .today { + didSet { + setUI() + } + } + + // MARK: - Life Cycle + + override init(frame: CGRect) { + super.init(frame: frame) + setUI() + } + + @available(*, unavailable) + required init!(coder aDecoder: NSCoder!) { + fatalError("init(coder:) has not been implemented") + } + + override func layoutSubviews() { + super.layoutSubviews() + } +} + +extension CalendarDayCell { + private func setUI() { + switch self.backgroundType { + case .today: + dayBackView.backgroundColor = .yellow_mild + case .none: + dayBackView.backgroundColor = .nottodoGray1 + } + } +} diff --git a/NotToDo/NotToDo/Presentation/HomeScene/Cells/HomeMissionCollectionViewCell.swift b/NotToDo/NotToDo/Presentation/HomeScene/Cells/HomeMissionCollectionViewCell.swift index 97d2c78..a0e1a2c 100644 --- a/NotToDo/NotToDo/Presentation/HomeScene/Cells/HomeMissionCollectionViewCell.swift +++ b/NotToDo/NotToDo/Presentation/HomeScene/Cells/HomeMissionCollectionViewCell.swift @@ -239,7 +239,7 @@ extension HomeMissionCollectionViewCell { cancelLineView.isHidden = true } else { statusButton.setImage(.checkDefault, for: .normal) - cancelLineView.isHidden = false + cancelLineView.isHidden = true } }