SFFocusViewLayout is a UICollectionViewLayout subclass for displaying focused content on UICollectionView which is the largest cell of all.
<img src="./Screenshots/SFFocusViewLayout.gif" alt="SFFocusViewLayout" title="SFFocusViewLayout">
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
SFFocusViewLayout is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "SFFocusViewLayout"
- Carthage support
- Swift version
Sergio Fernández, [email protected]
This CocoaPod is heavily inspired by the Ultravisual example of Ray Wenderlich.
SFFocusViewLayout is available under the MIT license. See the LICENSE file for more info.