diff --git a/FSCalendar/FSCalendar.m b/FSCalendar/FSCalendar.m index 30da90d..9b51fa2 100644 --- a/FSCalendar/FSCalendar.m +++ b/FSCalendar/FSCalendar.m @@ -361,7 +361,7 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) { _collectionView.frame = _daysContainer.bounds; } - + _collectionView.fs_height = FSCalendarHalfFloor(_collectionView.fs_height); _topBorder.frame = CGRectMake(0, -1, self.fs_width, 1); _bottomBorder.frame = CGRectMake(0, self.fs_height, self.fs_width, 1); _scopeHandle.fs_bottom = _bottomBorder.fs_top; diff --git a/FSCalendar/FSCalendarConstants.h b/FSCalendar/FSCalendarConstants.h index ed0ea59..8df7a72 100644 --- a/FSCalendar/FSCalendarConstants.h +++ b/FSCalendar/FSCalendarConstants.h @@ -68,6 +68,10 @@ CG_EXTERN CGSize const CGSizeAutomatic; #define FSCalendarMod(c1,c2) fmodf(c1,c2) #endif +#define FSCalendarHalfRound(c) (FSCalendarRound(c*2)*0.5) +#define FSCalendarHalfFloor(c) (FSCalendarFloor(c*2)*0.5) +#define FSCalendarHalfCeil(c) (FSCalendarCeil(c*2)*0.5) + #define FSCalendarUseWeakSelf __weak __typeof__(self) FSCalendarWeakSelf = self; #define FSCalendarUseStrongSelf __strong __typeof__(self) self = FSCalendarWeakSelf;