Skip to content

Commit

Permalink
Update Documentation and 'README.md'.
Browse files Browse the repository at this point in the history
  • Loading branch information
WenchaoD committed Sep 24, 2018
1 parent 6b54500 commit 130c99c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
12 changes: 6 additions & 6 deletions README-OBJECTIVE-C.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![fspagerview](https://cloud.githubusercontent.com/assets/5186464/24086370/45e7e8dc-0d49-11e7-86aa-139354fe00c5.jpg)

[![Languages](https://img.shields.io/badge/language-swift%20|%20objc-FF69B4.svg?style=plastic)](#) <br/>
[![Languages](https://img.shields.io/badge/language-swift%204.2%20|%20objc-FF69B4.svg?style=plastic)](#) <br/>
[![Platform](https://img.shields.io/badge/platform-iOS%20|%20tvOS-blue.svg?style=plastic)](http://cocoadocs.org/docsets/FSPagerView)
[![Version](https://img.shields.io/cocoapods/v/FSPagerView.svg?style=flat)](http://cocoadocs.org/docsets/FSPagerView)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=plastic)](https://github.com/Carthage/Carthage)
Expand Down Expand Up @@ -46,17 +46,17 @@ A boolean value indicates whether the pager view has infinite number of items. D
pagerView.isInfinite = YES;
```

### pagingDistance
An unsigned integer value that determines the paging distance of the pager view, which indicates the number of passing items during a single paging. When the value of this property is FSPagerViewAutomaticPagingDistance(0), the actual 'distance' is automatically calculated according to the scrolling speed of the pager view. Default is 1.
### decelerationDistance
An unsigned integer value that determines the paging distance of the pager view, which indicates the number of passing items during the deceleration. When the value of this property is FSPagerViewAutomaticDistance, the actual 'distance' is automatically calculated according to the scrolling speed of the pager view. Default is 1.

**e.g.**

```objc
pagerView.pagingDistance = 2
pagerView.decelerationDistance = 2
```

### itemSize
The item size of the pager view. When the value of this property is CGSizeZero, the items fill the entire visible area of the pager view. Default is CGSizeZero.
The item size of the pager view. When the value of this property is FSPagerViewAutomaticSize, the items fill the entire visible area of the pager view. Default is FSPagerViewAutomaticSize.


**e.g.**
Expand Down Expand Up @@ -400,7 +400,7 @@ FSPageControl *pageControl = [[FSPageControl alloc] initWithFrame:frame2];
* Buy me a ***Coffee***. ☕️

<a href="https://www.paypal.me/WenchaoD" target="_blank"><img src="https://www.paypalobjects.com/webstatic/i/logo/rebrand/ppcom.svg" width="100" height="40" style="margin-bottom:-15px;"></a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://cloud.githubusercontent.com/assets/5186464/15096775/bacc0506-1539-11e6-91b7-b1a7a773622b.png" target="_blank"><img src="http://a1.mzstatic.com/us/r30/Purple49/v4/50/16/b3/5016b341-39c1-b47b-2994-d7e23823baed/icon175x175.png" width="40" height="40" style="margin-bottom:-15px;-webkit-border-radius:10px;border:1px solid rgba(30, 154, 236, 1);"></a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://user-images.githubusercontent.com/5186464/45949944-46960480-c030-11e8-9e90-30b015698cf6.png" target="_blank"><img src="http://a1.mzstatic.com/us/r30/Purple49/v4/50/16/b3/5016b341-39c1-b47b-2994-d7e23823baed/icon175x175.png" width="40" height="40" style="margin-bottom:-15px;-webkit-border-radius:10px;border:1px solid rgba(30, 154, 236, 1);"></a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://cloud.githubusercontent.com/assets/5186464/15096872/b06f3a3a-153c-11e6-89f9-2e9c7b88ef42.png" target="_blank"><img src="http://a4.mzstatic.com/us/r30/Purple49/v4/23/31/14/233114f8-2e8d-7b63-8dc5-85d29893061e/icon175x175.jpeg" height="40" width="40" style="margin-bottom:-15px; -webkit-border-radius: 10px;border:1px solid rgba(43, 177, 0, 1)"></a>

---
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![fspagerview](https://cloud.githubusercontent.com/assets/5186464/24086370/45e7e8dc-0d49-11e7-86aa-139354fe00c5.jpg)

[![Languages](https://img.shields.io/badge/language-swift%20|%20objc-FF69B4.svg?style=plastic)](#) <br/>
[![Languages](https://img.shields.io/badge/language-swift%204.2%20|%20objc-FF69B4.svg?style=plastic)](#) <br/>
[![Platform](https://img.shields.io/badge/platform-iOS%20|%20tvOS-blue.svg?style=plastic)](http://cocoadocs.org/docsets/FSPagerView)
[![Version](https://img.shields.io/cocoapods/v/FSPagerView.svg?style=plastic)](http://cocoadocs.org/docsets/FSPagerView)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=plastic)](https://github.com/Carthage/Carthage)
Expand Down Expand Up @@ -51,17 +51,17 @@ A boolean value indicates whether the pager view has infinite number of items. D
pagerView.isInfinite = true
```

### pagingDistance
An unsigned integer value that determines the paging distance of the pager view, which indicates the number of passing items during a single paging. When the value of this property is FSPagerViewAutomaticPagingDistance(0), the actual 'distance' is automatically calculated according to the scrolling speed of the pager view. Default is 1.
### decelerationDistance
An unsigned integer value that determines the paging distance of the pager view, which indicates the number of passing items during the deceleration. When the value of this property is FSPagerView.automaticDistance, the actual 'distance' is automatically calculated according to the scrolling speed of the pager view. Default is 1.

**e.g.**

```swift
pagerView.pagingDistance = 2
pagerView.decelerationDistance = 2
```

### itemSize
The item size of the pager view. When the value of this property is .zero, the items fill the entire visible area of the pager view. Default is .zero.
The item size of the pager view. When the value of this property is FSPagerView.automaticSize, the items fill the entire visible area of the pager view. Default is FSPagerView.automaticSize.

**e.g.**

Expand Down Expand Up @@ -403,7 +403,7 @@ func pagerViewDidEndDecelerating(_ pagerView: FSPagerView)
* Buy me a Coffee. ☕️

<a href="https://www.paypal.me/WenchaoD" target="_blank"><img src="https://www.paypalobjects.com/webstatic/i/logo/rebrand/ppcom.svg" width="100" height="40" style="margin-bottom:-15px;"></a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://cloud.githubusercontent.com/assets/5186464/15096775/bacc0506-1539-11e6-91b7-b1a7a773622b.png" target="_blank"><img src="http://a1.mzstatic.com/us/r30/Purple49/v4/50/16/b3/5016b341-39c1-b47b-2994-d7e23823baed/icon175x175.png" width="40" height="40" style="margin-bottom:-15px;-webkit-border-radius:10px;border:1px solid rgba(30, 154, 236, 1);"></a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://user-images.githubusercontent.com/5186464/45949944-46960480-c030-11e8-9e90-30b015698cf6.png" target="_blank"><img src="http://a1.mzstatic.com/us/r30/Purple49/v4/50/16/b3/5016b341-39c1-b47b-2994-d7e23823baed/icon175x175.png" width="40" height="40" style="margin-bottom:-15px;-webkit-border-radius:10px;border:1px solid rgba(30, 154, 236, 1);"></a> &nbsp;&nbsp;|&nbsp;&nbsp;
<a href="https://cloud.githubusercontent.com/assets/5186464/15096872/b06f3a3a-153c-11e6-89f9-2e9c7b88ef42.png" target="_blank"><img src="http://a4.mzstatic.com/us/r30/Purple49/v4/23/31/14/233114f8-2e8d-7b63-8dc5-85d29893061e/icon175x175.jpeg" height="40" width="40" style="margin-bottom:-15px; -webkit-border-radius: 10px;border:1px solid rgba(43, 177, 0, 1)"></a>

---
Expand Down
4 changes: 2 additions & 2 deletions Sources/FSPagerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega
}
}

/// The item size of the pager view. When the value of this property is .automaticSize, the items fill the entire visible area of the pager view. Default is .automaticSize.
/// The item size of the pager view. When the value of this property is FSPagerView.automaticSize, the items fill the entire visible area of the pager view. Default is FSPagerView.automaticSize.
@IBInspectable
open var itemSize: CGSize = automaticSize {
didSet {
Expand All @@ -129,7 +129,7 @@ open class FSPagerView: UIView,UICollectionViewDataSource,UICollectionViewDelega
}
}

/// An unsigned integer value that determines the paging distance of the pager view, which indicates the number of passing items during the deceleration. When the value of this property is FSPagerView.automaticDistance(0), the actual 'distance' is automatically calculated according to the scrolling speed of the pager view. Default is 1.
/// An unsigned integer value that determines the paging distance of the pager view, which indicates the number of passing items during the deceleration. When the value of this property is FSPagerView.automaticDistance, the actual 'distance' is automatically calculated according to the scrolling speed of the pager view. Default is 1.
@IBInspectable
open var decelerationDistance: UInt = 1

Expand Down
13 changes: 9 additions & 4 deletions Sources/FSPagerViewObjcCompat.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>

#define FSPagerViewExtern extern

/// Requests that FSPagerView use the default value for a given distance.
extern NSUInteger const FSPagerViewAutomaticDistance;
/**
Requests that FSPagerView use the default value for a given distance.
*/
FSPagerViewExtern NSUInteger const FSPagerViewAutomaticDistance;

/// Requests that FSPagerView use the default value for a given size.
extern CGSize const FSPagerViewAutomaticSize;
/**
Requests that FSPagerView use the default value for a given size.
*/
FSPagerViewExtern CGSize const FSPagerViewAutomaticSize;

0 comments on commit 130c99c

Please sign in to comment.