|
1 | 1 | # IrregularCollectionUIKit
|
2 | 2 |
|
3 |
| -[](https://travis-ci.org/Steve Kim/IrregularCollectionUIKit) |
| 3 | +[](https://travis-ci.org/pisces/IrregularCollectionUIKit) |
4 | 4 | [](http://cocoapods.org/pods/IrregularCollectionUIKit)
|
5 | 5 | [](http://cocoapods.org/pods/IrregularCollectionUIKit)
|
6 | 6 | [](http://cocoapods.org/pods/IrregularCollectionUIKit)
|
|
9 | 9 |
|
10 | 10 | To run the example project, clone the repo, and run `pod install` from the Example directory first.
|
11 | 11 |
|
12 |
| -## You can implement with collect view like this screenshot :) |
| 12 | +## You can implement with collection view like this screenshot :) |
13 | 13 | <p valign="top">
|
14 |
| -<img src="screenshots/sh_001.png"/> |
| 14 | +<img src="screenshots/sh_002.png" width="320"/> |
| 15 | +<img src="screenshots/sh_003.png" width="320"/> |
15 | 16 | </p>
|
16 | 17 |
|
| 18 | +### To implement collection view with the class ASIrregularCollectionViewController using Facebook AsyncDisplayKit |
| 19 | +```Swift |
| 20 | +class ASExampleCollectionViewController: ASIrregularCollectionViewController { |
| 21 | + |
| 22 | + override func viewDidLoad() { |
| 23 | + super.viewDidLoad() |
| 24 | + |
| 25 | + self.collectionViewLayout.columnSpacing = 1.4 |
| 26 | + self.collectionViewLayout.numberOfColumns = 3 |
| 27 | + self.collectionViewLayout.headerHeight = 0 |
| 28 | + self.collectionViewLayout.footerHeight = 0 |
| 29 | + |
| 30 | + self.collectionView.allowsMultipleSelection = true |
| 31 | + self.collectionView.alwaysBounceVertical = true |
| 32 | + |
| 33 | + self.collectionView.tuningParameters(for: .visibleOnly, rangeType: .fetchData) |
| 34 | + } |
| 35 | +} |
| 36 | +``` |
| 37 | + |
| 38 | +### To implement collection view with the class IrregularCollectionViewController using UIKit |
| 39 | +```Swift |
| 40 | +class ExampleCollectionViewController: IrregularCollectionViewController { |
| 41 | + |
| 42 | + override func viewDidLoad() { |
| 43 | + super.viewDidLoad() |
| 44 | + |
| 45 | + self.collectionViewLayout.columnSpacing = 1.4 |
| 46 | + self.collectionViewLayout.numberOfColumns = 3 |
| 47 | + self.collectionViewLayout.headerHeight = 0 |
| 48 | + self.collectionViewLayout.footerHeight = 0 |
| 49 | + |
| 50 | + self.collectionView.allowsMultipleSelection = true |
| 51 | + self.collectionView.alwaysBounceVertical = true |
| 52 | + } |
| 53 | +} |
| 54 | +``` |
| 55 | + |
17 | 56 | ## Requirements
|
18 | 57 |
|
19 | 58 | ## Installation
|
|
0 commit comments