diff --git a/TUCalendar.podspec b/TUCalendar.podspec index 4bb1e4d..3c719d4 100644 --- a/TUCalendar.podspec +++ b/TUCalendar.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'TUCalendar' - s.version = '1.1.1' + s.version = '1.1.2' s.summary = 'A short description of TUCalendar.' s.description = <<-DESC diff --git a/TUCalendar/TUCalendar/Views/TUCalendarDayView.m b/TUCalendar/TUCalendar/Views/TUCalendarDayView.m index bbf6e74..9507bd7 100644 --- a/TUCalendar/TUCalendar/Views/TUCalendarDayView.m +++ b/TUCalendar/TUCalendar/Views/TUCalendarDayView.m @@ -147,6 +147,10 @@ static CGFloat const kTodayLabelHeight = 12.f; } - (void)setState:(TUCalendarDayViewState *)state { + if (!self.dayViewAppearance) { + self.dayViewAppearance = [TUCalendarDayViewAppearance new]; + } + self.dayButton.selected = NO; self.dayButton.highlighted = NO; self.dayButton.enabled = NO; @@ -208,14 +212,6 @@ static CGFloat const kTodayLabelHeight = 12.f; self.backgroundColor = self.dayViewAppearance.backgroundColor; } -- (void)didMoveToSuperview { - [super didMoveToSuperview]; - - if (!self.dayViewAppearance) { - self.dayViewAppearance = [TUCalendarDayViewAppearance new]; - } -} - - (void)updateBackgroundState { UIControlState buttonState = self.dayButton.state;