Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fdzsergio/SFFocusViewLayout
UICollectionViewLayout with focused content
https://github.com/fdzsergio/SFFocusViewLayout
carthage cocoapods ios swift uicollectionviewlayout
Last synced: 2 months ago
JSON representation
UICollectionViewLayout with focused content
- Host: GitHub
- URL: https://github.com/fdzsergio/SFFocusViewLayout
- Owner: fdzsergio
- License: mit
- Created: 2015-10-07T11:22:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-09-29T16:30:27.000Z (over 6 years ago)
- Last Synced: 2024-10-29T17:56:00.047Z (4 months ago)
- Topics: carthage, cocoapods, ios, swift, uicollectionviewlayout
- Language: Swift
- Homepage:
- Size: 3.96 MB
- Stars: 1,761
- Watchers: 39
- Forks: 180
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - SFFocusViewLayout - UICollectionViewLayout with focused content. (UI / Tag)
- awesome-ios-star - SFFocusViewLayout - UICollectionViewLayout with focused content. (UI / Tag)
- awesome-ios - SFFocusViewLayout - `UICollectionViewLayout` with focused content. [•](https://raw.githubusercontent.com/fdzsergio/SFFocusViewLayout/master/Screenshots/SFFocusViewLayout.gif) (Content / Layout)
- Awesome-Mobile-UI - SFFocusViewLayout - C |  | (ALL)
README
# SFFocusViewLayout
[](https://travis-ci.org/fdzsergio/SFFocusViewLayout)
[](https://codecov.io/github/fdzsergio/SFFocusViewLayout?branch=master)
[]()
[](http://cocoapods.org/pods/SFFocusViewLayout)
[](https://github.com/apple/swift-package-manager)
[](https://github.com/Carthage/Carthage)
[](http://cocoapods.org/pods/SFFocusViewLayout)
[](http://cocoapods.org/pods/SFFocusViewLayout)## 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.
```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 3 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 2.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'
```
### CarthageYou 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
- [x] Upgrade to Swift 3## Author
Sergio Fernández, [email protected]
## 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.