Latest 1.1.3
Homepage https://github.com/ivanbruel/SeparatorCollectionViewFlowLayout
License MIT
Platforms ios 8.0
Authors

Moya-SeparatorCollectionViewFlowLayout

CocoaPods

A UICollectionViewFlowLayout implementation to allow separators between cells.

Be sure to allow spacing between cells to be able to show the separator!

Example

Installation

Cocoapods

pod 'SeparatorCollectionViewFlowLayout', '~> 1.0'

Usage

1. Programatically

import Foundation
import UIKit
import SeparatorCollectionViewFlowLayout

// MARK: Initializer and Properties
class SomeViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate {

  let collectionView: UICollectionView
  let separatorCollectionViewFlowLayout: SeparatorCollectionViewFlowLayout

  init() {
    separatorCollectionViewFlowLayout = SeparatorCollectionViewFlowLayout(separatorWidth: 1.0, separatorColor: UIColor.grayColor())
    collectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: separatorCollectionViewFlowLayout)

    super.init(nibName: nil, bundle: nil)

    collectionView.delegate = self
    collectionView.dataSource = self

    view.addSubview(collectionView)
  }

  ...
}

2. Storyboard

Just change the default class of your UICollectionViewFlowLayout to SeparatorCollectionViewFlowLayout and set the Separator Width and Separator Color properties.

Example

Contributing

Issues and pull requests are welcome!

Author

Ivan Bruel @ivanbruel

License

SeparatorCollectionViewFlowLayout is released under an MIT license. See LICENSE for more information.

Latest podspec

{
    "name": "SeparatorCollectionViewFlowLayout",
    "version": "1.1.3",
    "summary": "A UICollectionViewFlowLayout implementation to allow separators between cells",
    "description": "A UICollectionViewFlowLayout implementation to allow separators between cellsnwith a custom separator color and width.nInstructions on how to use it are inn[the README](https://github.com/ivanbruel/SeparatorCollectionViewFlowLayout).",
    "homepage": "https://github.com/ivanbruel/SeparatorCollectionViewFlowLayout",
    "license": {
        "type": "MIT",
        "file": "License"
    },
    "authors": {
        "Ivan Bruel": "[email protected]"
    },
    "social_media_url": "http://twitter.com/ivanbruel",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/ivanbruel/SeparatorCollectionViewFlowLayout.git",
        "tag": "1.1.3"
    },
    "default_subspecs": "Core",
    "subspecs": [
        {
            "name": "Core",
            "source_files": "Source/*.swift",
            "frameworks": "UIKit",
            "dependencies": {
                "UICollectionViewLeftAlignedLayout": [
                    "~> 1.0.1"
                ]
            }
        }
    ]
}

Pin It on Pinterest

Share This