- Implement a subclass of
PXFullBleedHeaderView
The important (and only) features of this class are themaxHeight
andminHeight
properties. These allow your subclass to determine how tall the header should be when scrolled all the way to the top of the collection view, and how short to make it as scrolling moves down. - Make a
UIViewController
and a custom view subclass with aPXFullBleedHeaderCollectionView
in it.
This collection view has aheaderView
property for an instance of your header view. Then, you add yourself as the datasource and delegate of thePXFullBleedHeaderCollectionView
and you're ready to go. - Make sure your content looks good as it resizes.
Your collection views can now look this good:
(Note the image centering is not built in by default. See PXImageView for details.)
To run the example project, clone the repo, and run pod install
from the Example directory first.
PXFullBleedCollectionView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "PXFullBleedCollectionView"
Daniel Blakemore, [email protected]
PXFullBleedCollectionView is available under the MIT license. See the LICENSE file for more info.