Posts

Showing posts with the label uicollectionview

UICollectionView sticky header

// Initialize Flow Layout.     UICollectionViewFlowLayout *layout=[[ UICollectionViewFlowLayout alloc ] init ];     layout. sectionHeadersPinToVisibleBounds = YES ;     layout.itemSize = CGSizeMake(cellWidth, cellHeight);     layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;     layout. minimumInteritemSpacing = 5 ;     layout. minimumLineSpacing = 5 ; Assign this  UICollectionViewFlowLayout to UICollectionView and to collection view sticky header get sets.