Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problems with weekday view height and visibility #272

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 2 additions & 6 deletions JTCalendar/Views/JTCalendarPageView.m
Expand Up @@ -66,6 +66,7 @@ - (void)reload
_weekDayView = [_manager.delegateManager buildWeekDayView];
[self addSubview:_weekDayView];
}
_weekDayView.hidden = !_manager.settings.pageViewHaveWeekDaysView;
_weekDayView.manager = _manager;
[_weekDayView reload];

Expand Down Expand Up @@ -131,12 +132,7 @@ - (void)layoutSubviews
CGFloat weekWidth = self.frame.size.width;

if(_manager.settings.pageViewHaveWeekDaysView){
CGFloat weekDayHeight = _weekDayView.frame.size.height; // Force use default height

if(weekDayHeight == 0){ // Or use the same height than weeksViews
weekDayHeight = self.frame.size.height / (_numberOfWeeksDisplayed + 1);
}

CGFloat weekDayHeight = self.frame.size.height / (_numberOfWeeksDisplayed + 1);
_weekDayView.frame = CGRectMake(0, 0, weekWidth, weekDayHeight);
y = weekDayHeight;
}
Expand Down