# SFFocusViewLayout **Repository Path**: mainzxq/SFFocusViewLayout ## Basic Information - **Project Name**: SFFocusViewLayout - **Description**: UICollectionViewLayout with focused content - **Primary Language**: Swift - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2016-06-07 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SFFocusViewLayout [![Travis CI](https://travis-ci.org/fdzsergio/SFFocusViewLayout.svg?branch=master)](https://travis-ci.org/fdzsergio/SFFocusViewLayout) [![Version](https://img.shields.io/cocoapods/v/SFFocusViewLayout.svg?style=flat)](http://cocoapods.org/pods/SFFocusViewLayout) [![codecov.io](https://codecov.io/github/fdzsergio/SFFocusViewLayout/coverage.svg?branch=master)](https://codecov.io/github/fdzsergio/SFFocusViewLayout?branch=master) [![License](https://img.shields.io/cocoapods/l/SFFocusViewLayout.svg?style=flat)](http://cocoapods.org/pods/SFFocusViewLayout) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Platform](https://img.shields.io/cocoapods/p/SFFocusViewLayout.svg?style=flat)](http://cocoapods.org/pods/SFFocusViewLayout) ## Overview SFFocusViewLayout is a UICollectionViewLayout subclass for displaying focused content on UICollectionView which is the largest cell of all.

SFFocusViewLayout

## Usage SFFocusViewLayout contains three properties to customize the interface. ```swift var standardHeight: CGFloat var focusedHeight: CGFloat var dragOffset: CGFloat ``` - _focusedHeight_ is the height cells should be when focused. Defaults to 280 - _standardHeight_ is the height cells should be when collapsed. Defaults to 100 - _dragOffset_ is the amount the user needs to scroll before the featured cell changes. Defaults to 180 ## Versions ### Swift If you want to use a Swift implementation of this framework use a 3.0 or greater version ```ruby pod 'SFFocusViewLayout', '~> 3.0' ``` ### Objective–C If you want to use a Objective–C implementation of this framework use a 3.0 or greater version ```ruby pod 'SFFocusViewLayout', '~> 2.0' ``` ## Installation ### CocoaPods SFFocusViewLayout is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile: ```ruby pod 'SFFocusViewLayout' ``` ### Carthage You can also install it via [Carthage](https://github.com/Carthage/Carthage). To do so, add the following to your Cartfile: ```terminal github 'fdzsergio/SFFocusViewLayout' ``` ## Roadmap - [x] Carthage support - [x] Swift compatible - [x] Swift version - [x] Tests ## Author Sergio Fernández, fdz.sergio@gmail.com ## Acknowledgement This framework is heavily inspired by the Ultravisual example of [Ray Wenderlich](http://www.raywenderlich.com/99087/swift-expanding-cells-ios-collection-views). ## License SFFocusViewLayout is available under the MIT license. See the [LICENSE](https://raw.githubusercontent.com/fdzsergio/SFFocusViewLayout/master/LICENSE) file for more info.