Fix problem adding calendar in code

Fix problem adding calendar in code
This commit is contained in:
f33chobits 2015-04-12 12:25:12 +08:00
parent cd1a25a7f7
commit 8a900ab3fa
2 changed files with 2 additions and 0 deletions

View File

@ -173,6 +173,7 @@
_supressEvent = YES;
CGFloat padding = self.fs_height * 0.01;
_collectionView.frame = CGRectMake(0, kWeekHeight, self.fs_width, self.fs_height-kWeekHeight);
_collectionView.contentInset = UIEdgeInsetsZero;
_collectionViewFlowLayout.itemSize = CGSizeMake(
_collectionView.fs_width/7-(_flow == FSCalendarFlowVertical)*0.1,
(_collectionView.fs_height-padding*2)/6

View File

@ -79,6 +79,7 @@
{
[super layoutSubviews];
_collectionView.frame = self.bounds;
_collectionView.contentInset = UIEdgeInsetsZero;
_collectionViewFlowLayout.itemSize = CGSizeMake(self.fs_width * 0.5,
self.fs_height);
CGFloat scrollOffset = self.scrollOffset;