Skip to content

atoxx/SFFocusViewLayout

 
 

Repository files navigation

SFFocusViewLayout

CI Status Version License Platform

Overview

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">

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:

pod "SFFocusViewLayout"

Upcoming

  • Carthage support
  • Swift version

Author

Sergio Fernández, [email protected]

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.

About

UICollectionViewLayout with focused content

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 73.7%
  • Shell 23.0%
  • Ruby 3.3%