Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var isToday : Bool = false {
- didSet {
- switch isToday {
- case true:
- self.bgView.backgroundColor = CalendarView.Style.cellColorToday
- self.textLabel.textColor = CalendarView.Style.cellTextColorToday
- case false:
- self.bgView.backgroundColor = CalendarView.Style.cellColorDefault
- self.textLabel.textColor = CalendarView.Style.cellTextColorDefault
- }
- }
- }
- var isWeekend: Bool = false {
- didSet {
- if self.isToday { return }
- switch isWeekend {
- case true:
- self.textLabel.textColor = CalendarView.Style.cellTextColorWeekend
- case false:
- self.textLabel.textColor = CalendarView.Style.cellTextColorDefault
- }
- }
- }
- override open var isSelected : Bool {
- didSet {
- switch isSelected {
- case true:
- self.bgView.layer.borderColor = CalendarView.Style.cellSelectedBorderColor.cgColor
- self.bgView.layer.borderWidth = CalendarView.Style.cellSelectedBorderWidth
- case false:
- self.bgView.layer.borderColor = CalendarView.Style.cellBorderColor.cgColor
- self.bgView.layer.borderWidth = CalendarView.Style.cellBorderWidth
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement