Compare commits

...

6 Commits

Author SHA1 Message Date
Arnaud Dorgans 1fbb837941 update 2017-12-25 18:36:20 +01:00
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 42 additions and 3 deletions
+3 -3
View File
@@ -8,8 +8,8 @@
Pod::Spec.new do |s|
s.name = 'InfiniteLayout'
s.version = '0.1.0'
s.summary = 'Vertical and Horizontal infinite scrolling for UICollectionView'
s.version = '0.1.3'
s.summary = 'Horizontal and Vertical infinite scrolling feature for UICollectionView'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
Vertical and Horizontal infinite scrolling for UICollectionView with Paging and NSProxy delegate
Horizontal and Vertical infinite scrolling feature for UICollectionView with Paging and NSProxy delegate
DESC
s.homepage = 'https://github.com/Arnoymous/InfiniteLayout'
+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