Compare commits

...

5 Commits

Author SHA1 Message Date
Arnaud Dorgans 5746d5a7c4 Update README.md 2017-12-25 18:30:35 +01:00
Arnaud Dorgans aacca75953 pod 2017-12-23 22:22:50 +01:00
Arnaud Dorgans 424edd4d73 Update README.md 2017-12-23 21:09:10 +01:00
Arnaud Dorgans addf423ee2 Update README.md 2017-12-23 20:58:52 +01:00
Arnaud Dorgans c11d525818 doc update 2017-12-23 20:58:04 +01:00
2 changed files with 40 additions and 1 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'InfiniteLayout'
s.version = '0.1.0'
s.version = '0.1.1'
s.summary = 'Vertical and Horizontal infinite scrolling for UICollectionView'
# This description is used to generate tags and improve search results.
+39
View File
@@ -20,6 +20,45 @@ it, simply add the following line to your Podfile:
pod 'InfiniteLayout'
```
## Usage
```swift
@IBOutlet weak var collectionView: InfiniteCollectionView!
```
InfiniteCollectionView doesn't need any other delegate or dataSource,
just use UICollectionViewDataSource and UICollectionViewDelegate in the same way as you'll use it in any other UICollectionView.
InfiniteLayout provides 3 classes for infinite scrolling:
**InfiniteLayout**: an UICollectionViewFlowLayout
**InfiniteCollectionView**: an UICollectionView with InfiniteLayout
**InfiniteCollectionViewController**: an UICollectionViewController with InfiniteCollectionView
### IndexPath
InfiniteCollectionView may create fake indexPath,
To get the real indexPath call
```swift
func indexPath(from infiniteIndexPath: IndexPath) -> IndexPath
```
To get the real section call
```swift
func section(from infiniteSection: Int) -> Int
```
### Paging
InfiniteCollectionView provide a paging functionality, you can enable it by setting the **isItemPagingEnabled** flag to **true**,
When the **isItemPagingEnabled** flag is enabled you can adjust the deceleration rate by setting the **velocityMultiplier**, the more the value is high, the more the deceleration is long
## Author
Arnoymous, ineox@me.com