1、开发中遇到bug 2020年8月,月和周切换,月的高度计算不正确
修改FSCalendarTransitionCoordinator中boundingRectForScope方法
- (CGRect)boundingRectForScope:(FSCalendarScope)scope page:(NSDate *)page
{
CGSize contentSize;
switch (scope) {
case FSCalendarScopeMonth: {
[self.calendar fs_setVariable:page forKey:@"_currentPage"];
contentSize = self.calendar.adjustsBoundingRectWhenChangingMonths ? [self.calendar sizeThatFits:self.calendar.frame.size scope:scope] : self.cachedMonthSize;
break;
}
case FSCalendarScopeWeek: {
contentSize = [self.calendar sizeThatFits:self.calendar.frame.size scope:scope];
break;
}
}
return (CGRect){CGPointZero, contentSize};
}
网友评论