jonathantribouharet / JTCalendar

A customizable calendar view for iOS.
MIT License
2.76k stars 531 forks source link

How to change JTCalendarDayView height #374

Closed y0unghe closed 6 years ago

y0unghe commented 6 years ago

I am trying to make the JTCalendarDayView height a little bigger. I have tried to change it inside calendarBuildDayView, but it's not working.

- (UIView<JTCalendarDay> *)calendarBuildDayView:(JTCalendarManager *)calendar {
    CustomCalendarDayView *view = [[CustomCalendarDayView alloc] init];
    CGRect bounds = view.bounds;
    bounds.size.height = 90;
    view.bounds = bounds;
    return view;
}
jonathantribouharet commented 6 years ago

Hi, yes you cannot do that, the size of this view is set by JTCalendarWeekView and the size of JTCalendarWeekView is set by JTCalendarPageView. Currently, it takes the maximum width and height available. So if you want to make the view bigger than that you have to override layoutSubviews in JTCalendarWeekView.

y0unghe commented 6 years ago

@jonathantribouharet Thanks. I just figured out, I made the JTHorizontalCalendarView height bigger, and the day view is taking the maximum height.