Objective-C UICollectionView Scroll Up/Down
Does anyone know, what method for UICollectionView, while scrolling
Up/Down. I need to change UICollectionView's Header while scrolling down.I
am doing own calendar View.
I have following method that creates header view for section
- (UICollectionReusableView *)collectionView:(UICollectionView
*)collectionView viewForSupplementaryElementOfKind:(NSString *)kind
atIndexPath:(NSIndexPath *)indexPath
{
ASCalendarHeaderView *calHeader = [self.calCollectView
dequeueReusableSupplementaryViewOfKind:kind
withReuseIdentifier:@"CalendarHeader" forIndexPath:indexPath];
calHeader.MonthYearLabel.text = [calendar
getCurrentMonthYear:calendar.today];
[calHeader setNeedsDisplay];
calHeader.MonthYearLabel.textAlignment = NSTextAlignmentRight;
if (indexPath.section){
[calendar getNextMonth:calendar.today];
NSLog(@"Some Text");
}
return calHeader;
}
But it increment month while I am scrolling up. Is there is method that
mean while scrolling up and while scrolling down separately?
Thanks
No comments:
Post a Comment