Open markst opened 9 years ago
What's happening? Can you post a screenshot?
From what I see you only specify a fixed height. This shouldn't interfere with the scrollToDate method.
ah so the issue is because I'm using a smaller size calendar view (90 pt high) which means the entire height of the calendar month doesn't fit.
A resolution for this is in the method scrollToDate:
Rather than scrolling to the date month section, scrolling to the exact index path works:
UICollectionViewLayoutAttributes *sectionLayoutAttributes = [self.collectionView layoutAttributesForItemAtIndexPath:selectedDateIndexPath];
I'm subclassing
PDTSimpleCalendarViewController
so that I can use a custom cell size. Which works fine:However this causes issues when scrolling to date:
scrollToDate:
Since the y origin in calculated:origin.y -= (PDTSimpleCalendarFlowLayoutHeaderHeight + PDTSimpleCalendarFlowLayoutInsetTop + self.collectionView.contentInset.top);