Skip to content

ankush-bhatia/HorizontalHeaderFlowLayout

Repository files navigation

HorizontalHeaderFlowLayout

Description:

  • HorizontalHeaderFlowLayout is a subclass of UICollectionViewLayout written in pure Swift language.
  • This library uses Apple's UIKit framework.

Features

  • Easy to use.
  • Cocoapods Integration.

Requirements

  • iOS 9.0+
  • Xcode 10+

Installation

  • HorizontalHeaderFlowLayout is available on CocoaPods.
  • Current version compatible with Swift 4.1.

Cocoapods

Add the following line to your Podfile:

pod 'HorizontalHeaderFlowLayout', '~> 1.0'

Manually

  1. Clone the repository or download it as a .zip file.
  2. Drag and drop HeaderFlowLayout.swift to your project.

Usage:

From Storyboard:

1. Change layout of CollectionView to custom and assign HeaderFlowLayout as class.

2. Import Framework

import HorizontalHeaderFlowLayout

3. Conform to HeaderFlowLayoutDelegate

class ViewController: UIViewController, HeaderFlowLayoutDelegate {

}

4. Implement required Delegate Methods.

Programatically:

1. Import Framework

import HorizontalHeaderFlowLayout

2. Instantiate HorizontalHeaderFlowLayout and add to CollectionView object.

collectionView.collectionViewLayout = HeaderFlowLayout()

3. Conform to HeaderFlowLayoutDelegate

class ViewController: UIViewController, HeaderFlowLayoutDelegate {

}

4. Implement required Delegate Methods.

Contribution

Any suggestions and contribution towards making it a better library is most welcome.

Authors

Ankush Bhatia

License

This project is licensed under the MIT License - LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published