JTCalendar
JTCalendar copied to clipboard
Can't see month of calendar
I am using UTCalendar in swift3 project. But couldn't show months.
I've added UTCalendarMenuView outlet and defined delegate method about menu view. Below is my code.
The result is below
What's wrong?
There is 2 things to do:
- set the menu view to the manager in ObjC
[_calendarManager setMenuView:_calendarMenuView];
- set the date to the manager after setting the menu view
[_calendarManager setDate:yourDate];
it's not clearly explain in the documentation, but if you set the date before, the menu view and content view are not initialised
Or you may have a problem of constraint of frame.
I am also facing the same issue. I have set the menuView before setting the date. It does not display the month and year at times.
I am so sad for this issue. Is there anybody who can help me?
For me problem was in the method
- (void)updatePageMode:(NSUInteger)pageMode
{
if(_pageMode == pageMode){
return;
}
_pageMode = pageMode;
[self repositionViews];
}
Line [self repositionViews] wasn't called never for JTCalendarPageModeFull.
I've changed method to
- (void)updatePageMode:(NSUInteger)pageMode
{
_pageMode = pageMode;
[self repositionViews];
}
Yes, maybe it is not good idea, but it works for me in my case
I am also facing same issue. It's not displaying at the start of calendar is loaded. After swiping through two months previous or next then it will visible. Please give a proper solution.
@jonathantribouharet