Overview
SFFocusViewLayout is a UICollectionViewLayout subclass for displaying focused content on UICollectionView which is the largest cell of all.
Usage
SFFocusViewLayout contains three properties to customize the interface.
@property (nonatomic) CGFloat standardHeight; @property (nonatomic) CGFloat focusedHeight; @property (nonatomic) CGFloat dragOffset;
- focusedHeight is the height cells should be when focused. Defaults to kSFFocusViewLayoutFocusedHeight
- standardHeight is the height cells should be when collapsed. Defaults to kSFFocusViewLayoutStandardHeight
- dragOffset is the amount the user needs to scroll before the featured cell changes
Installation
SFFocusViewLayout is available through CocoaPods. To install it, simply add the following line to your Podfile:
Upcoming
- Carthage support
- Swift version
Author
Sergio Fernández, fdz.sergio@gmail.com
Acknowledgement
This CocoaPod is heavily inspired by the Ultravisual example of Ray Wenderlich.
License
SFFocusViewLayout is available under the MIT license. See the LICENSE file for more info.