Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
  2. {
  3. return 1;
  4. }
  5.  
  6. - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
  7. {
  8. if (!self.displayMonthDate) {
  9. return 0;
  10. }
  11. NSInteger numberOfDaysPlusOffset = _numberOfDaysInMonth + _firstWeekdayOfMonthIndex;
  12. NSInteger remainingDaysToFillCalendar = 7 - (numberOfDaysPlusOffset % 7);
  13. return numberOfDaysPlusOffset + remainingDaysToFillCalendar;
  14. }
  15.  
  16. - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView
  17. viewForSupplementaryElementOfKind:(NSString *)kind
  18. atIndexPath:(NSIndexPath *)indexPath {
  19. //Used for each cell to draw
  20. }
  21.  
  22. - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
  23. //Setting item size here
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement