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.


Comments

Popular posts from this blog

Trending CocoaPods

Our Favorite Xcode Shortcuts

Resources for iOS Coding Standards and Styles