You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log:
//第一次点下一页
2024-04-09 16:14:39.592594+0800 currentMonth:Mon Jan 1 00:00:00 2024
2024-04-09 16:14:39.592738+0800 nextMonth:Thu Feb 1 00:00:00 2024
2024-04-09 16:14:39.593271+0800 self.calendar.currentPage:Thu Feb 1 00:00:00 2024
//第二次点一下页
2024-04-09 16:14:43.043717+0800 currentMonth:Thu Feb 1 00:00:00 2024
2024-04-09 16:14:43.043904+0800 nextMonth:Fri Mar 1 00:00:00 2024
2024-04-09 16:14:43.044649+0800 self.calendar.currentPage:Fri Mar 1 00:00:00 2024
The text was updated successfully, but these errors were encountered:
mpmpmp911
changed the title
当进入下一页中断后,currentPage 设置不正确。when go not set right
当进入下一页中断后,currentPage 设置不正确。when go to next page interrupt,currentPage not return right
Apr 9, 2024
类似 demo Prev-Next-Buttons 。
步骤:
step1. 点击nextClicked后,马上按住当前页面,不让日历进入下一个月,
step2. 松手,返回当前页面。
观察currentPage 的值与当前页面不一致。
currentPage已经为 下一个月的日期。
step3.再点击下一页 会连续跳两页。
希望 在进入一下页失败时,可以将current page 修改回来。
另外希望 可以get到 headerview title 的内容。
code:
(void)nextClicked:(UIButton *)sender
{
sender.imageEdgeInsets = UIEdgeInsetsMake(15, 0, 15, 0);
NSDate *currentMonth =self.calendar.currentPage;
// FSCalendarHeaderView *headerview = self.calendar.calendarHeaderView;
NSDate *nextMonth = [self.gregorian dateByAddingUnit:NSCalendarUnitMonth value:1 toDate:currentMonth options:0];
NSLog(@"currentMonth:%@",currentMonth);
NSLog(@"nextMonth:%@",nextMonth);
[self.calendar setCurrentPage:nextMonth animated:YES];
}
(void)calendarCurrentPageDidChange:(FSCalendar *)calendar{
NSLog(@"self.calendar.currentPage:%@",self.calendar.currentPage);
[self juddeNextButtonisEnable];
}
log:
//第一次点下一页
2024-04-09 16:14:39.592594+0800 currentMonth:Mon Jan 1 00:00:00 2024
2024-04-09 16:14:39.592738+0800 nextMonth:Thu Feb 1 00:00:00 2024
2024-04-09 16:14:39.593271+0800 self.calendar.currentPage:Thu Feb 1 00:00:00 2024
//第二次点一下页
2024-04-09 16:14:43.043717+0800 currentMonth:Thu Feb 1 00:00:00 2024
2024-04-09 16:14:43.043904+0800 nextMonth:Fri Mar 1 00:00:00 2024
2024-04-09 16:14:43.044649+0800 self.calendar.currentPage:Fri Mar 1 00:00:00 2024
The text was updated successfully, but these errors were encountered: