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

Find the height of a calendar cell #370

Open
Aleph72 opened this issue Mar 16, 2018 · 0 comments
Open

Find the height of a calendar cell #370

Aleph72 opened this issue Mar 16, 2018 · 0 comments

Comments

@Aleph72
Copy link

Aleph72 commented Mar 16, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant