diff --git a/README-OBJECTIVE-C.md b/README-OBJECTIVE-C.md index af25734..ee4cbd7 100644 --- a/README-OBJECTIVE-C.md +++ b/README-OBJECTIVE-C.md @@ -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)](#)
+[![Languages](https://img.shields.io/badge/language-swift%204.2%20|%20objc-FF69B4.svg?style=plastic)](#)
[![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) @@ -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.** @@ -400,7 +400,7 @@ FSPageControl *pageControl = [[FSPageControl alloc] initWithFrame:frame2]; * Buy me a ***Coffee***. ☕️   |   -   |   +   |   --- diff --git a/README.md b/README.md index 64f4225..dfaac64 100644 --- a/README.md +++ b/README.md @@ -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)](#)
+[![Languages](https://img.shields.io/badge/language-swift%204.2%20|%20objc-FF69B4.svg?style=plastic)](#)
[![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) @@ -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.** @@ -403,7 +403,7 @@ func pagerViewDidEndDecelerating(_ pagerView: FSPagerView) * Buy me a Coffee. ☕️   |   -   |   +   |   --- diff --git a/Sources/FSPagerView.swift b/Sources/FSPagerView.swift index 3fbd463..97117bf 100644 --- a/Sources/FSPagerView.swift +++ b/Sources/FSPagerView.swift @@ -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 { @@ -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 diff --git a/Sources/FSPagerViewObjcCompat.h b/Sources/FSPagerViewObjcCompat.h index 82e938c..755f30f 100644 --- a/Sources/FSPagerViewObjcCompat.h +++ b/Sources/FSPagerViewObjcCompat.h @@ -9,10 +9,15 @@ #import #import +#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;