Latest 2.2.0
Homepage https://github.com/yacir/YBSlantedCollectionViewLayout
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

Version
[SPM]()
Carthage compatible
[Swift Version]()
Build Status
codecov
Platform
License

Overview

YBSlantedCollectionViewLayout is a subclass of UICollectionViewLayout allowing the display of slanted content on UICollectionView.

[Live Demo] (https://appetize.io/app/nd8vgwg0rkke19nmw3wzkapr5g)

YBSlantedCollectionViewLayout

Usage

YBSlantedCollectionViewLayout contains six properties to customize the interface.

var slantingDelta: UInt
var reverseSlantingAngle: Bool
var firstCellSlantingEnabled: Bool
var lastCellSlantingEnabled: Bool
var lineSpacing: CGFloat
var scrollDirection: UICollectionViewScrollDirection
var itemSizeOptions: YBSlantedCollectionViewLayoutSizeOptions
  • slantingDelta is the slanting delta. Defaults to 50
  • reverseSlantingAngle allows to reverse the slanting angle if the value is true. By default, this property is set to false
  • firstCellSlantingEnabled allows to enable the slanting for the first cell. By default, this property is set to true
  • lastCellSlantingEnabled allows to enable the slanting for the last cell. By default, this property is set to true
  • lineSpacing is the spacing to use between two items. Defaults to 10.0
  • scrollDirection is the scroll direction. Defaults to UICollectionViewScrollDirectionVertical
  • itemSizeOptions allows to set the item’s width/height depending on the scroll direction.

Apply the slanting mask

To apply the slanting mask on the cellView, use the YBSlantedCollectionViewCell or subclass it.

Installation

CocoaPods

YBSlantedCollectionViewLayout is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "YBSlantedCollectionViewLayout", '~> 2.2'

Carthage

You can also install it via Carthage. To do so, add the following to your Cartfile:

github 'yacir/YBSlantedCollectionViewLayout'

Roadmap

  • [x] Improve the attribution of the clic
  • [x] Carthage support
  • [x] Tests
  • [x] Swift 3 support
  • [x] Swift Package Manager support

Author

Yassir Barchi

Acknowledgement

This framework is inspired by this prototype released by Matt Bridges.

License

YBSlantedCollectionViewLayout is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "YBSlantedCollectionViewLayout",
    "version": "2.2.0",
    "summary": "UICollectionViewLayout allowing the display of slanted content on UICollectionView",
    "description": "YBSlantedCollectionViewLayout is a subclass of UICollectionViewLayout allowing the display of slanted content on UICollectionView.",
    "homepage": "https://github.com/yacir/YBSlantedCollectionViewLayout",
    "license": "MIT",
    "authors": {
        "Yassir Barchi": "[email protected]"
    },
    "source": {
        "git": "https://github.com/yacir/YBSlantedCollectionViewLayout.git",
        "tag": "2.2.0"
    },
    "social_media_url": "https://linkedin.com/in/yassir-barchi-318a7949",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Source/*.{h,swift}",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.0.2"
}

Pin It on Pinterest

Share This