Find the height of a calendar cell
Opened this issue · 0 comments
Aleph72 commented
Hi,
I need to find the height of the current month's day cell, where can I get it?
Right now I've tried to get it from JTCalendarDayView.m:
in the method -(void)layoutSubviews
if (_isFirstDay) {
CGRect newFrame = CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width * 2, self.frame.size.height);
self.frame = newFrame;
}
self.cellHeight = self.frame.size.height;
self.cellHeight is a new property that I've added to the class.
Then I get this value in my own class, method - (void)calendar:(JTCalendarManager *)calendar prepareDayView:(JTCalendarDayView *)dayView
The problem is that this last method gets called for each day of the current, previous and next month, but I need to show the cells' height of the current month only.
Any idea how to do this?