Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
- {
- return 1;
- }
- - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
- {
- if (!self.displayMonthDate) {
- return 0;
- }
- NSInteger numberOfDaysPlusOffset = _numberOfDaysInMonth + _firstWeekdayOfMonthIndex;
- NSInteger remainingDaysToFillCalendar = 7 - (numberOfDaysPlusOffset % 7);
- return numberOfDaysPlusOffset + remainingDaysToFillCalendar;
- }
- - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView
- viewForSupplementaryElementOfKind:(NSString *)kind
- atIndexPath:(NSIndexPath *)indexPath {
- //Used for each cell to draw
- }
- - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
- //Setting item size here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement