Skip to content

darkdongdong/IrregularCollectionUIKit

 
 

Repository files navigation

IrregularCollectionUIKit

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

You can implement layout of collection view like this screenshot :)

To implement collection view with the class ASIrregularCollectionViewController using Facebook AsyncDisplayKit

class ASExampleCollectionViewController: ASIrregularCollectionViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.collectionViewLayout.columnSpacing = 1.4
        self.collectionViewLayout.numberOfColumns = 3
        self.collectionViewLayout.headerHeight = 0
        self.collectionViewLayout.footerHeight = 0
        
        self.collectionView.allowsMultipleSelection = true
        self.collectionView.alwaysBounceVertical = true
        
        self.collectionView.tuningParameters(for: .visibleOnly, rangeType: .fetchData)
    }
}

To implement collection view with the class IrregularCollectionViewController using UIKit

class ExampleCollectionViewController: IrregularCollectionViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.collectionViewLayout.columnSpacing = 1.4
        self.collectionViewLayout.numberOfColumns = 3
        self.collectionViewLayout.headerHeight = 0
        self.collectionViewLayout.footerHeight = 0
        
        self.collectionView.allowsMultipleSelection = true
        self.collectionView.alwaysBounceVertical = true
    }
}

Requirements

Installation

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

pod "IrregularCollectionUIKit"

Author

Steve Kim, pisces@retrica.co

License

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

About

Irregular Collection View Layout and Controller

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 51.7%
  • Objective-C++ 46.6%
  • Shell 0.8%
  • Swift 0.5%
  • C 0.3%
  • Ruby 0.1%