fix day view appearance set

This commit is contained in:
Ivan Smolin 2016-11-25 16:25:25 +03:00
parent a11136c29c
commit b46bbcabae
2 changed files with 5 additions and 9 deletions

View File

@ -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

View File

@ -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;