Update README and descriptions

This commit is contained in:
WenchaoD 2017-02-19 09:26:06 +08:00
parent 3604eaeffc
commit 22f90701dd
4 changed files with 24 additions and 7 deletions

View File

@ -5,12 +5,13 @@ Pod::Spec.new do |s|
s.summary = "FSPagerView is an elegant Screen Slide Library for making Banner、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders."
s.homepage = "https://github.com/WenchaoD/FSPagerView"
s.screenshots = "https://cloud.githubusercontent.com/assets/5186464/22686432/19b567f8-ed5f-11e6-885d-bd660c98b507.gif"
s.license = 'MIT'
s.author = { "Wenchao Ding" => "f33chobits@gmail.com" }
s.source = { :git => "https://github.com/WenchaoD/FSPagerView.git", :tag => s.version.to_s }
s.platform = :ios
s.ios.deployment_target = '8.0'
s.ios.deployment_target = '7.0'
s.requires_arc = true
s.framework = 'UIKit'
s.source_files = 'FSPagerView/*.swift'

View File

@ -51,6 +51,7 @@ open class FSPageControl: UIControl {
}
}
/// The horizontal alignment of content within the controls bounds. Default is center.
open override var contentHorizontalAlignment: UIControlContentHorizontalAlignment {
didSet {
self.setNeedsLayout()

View File

@ -166,6 +166,13 @@ The current page, highlighted by the page control. Default is 0.
```objc
pageControl.currentPage = 1;
```
### contentHorizontalAlignment
The horizontal alignment of content within the controls bounds. Default is center.
**e.g.**
```swift
pageControl.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
```
### setStrokeColor:forState:
Sets the stroke color for page indicators to use for the specified state. (selected/normal).
@ -228,9 +235,9 @@ pod FSPagerView
* [Implement FSPagerViewDataSource](#implement_fspagerviewdatasource)
* [Implement FSPagerViewDelegate](#implement_fspagerviewdelegate)
### 1. Get start <a id='get_start'></a>
### 1. Get started <a id='get_start'></a>
* Get start with code
* Get started with code
```objc
// Create a pager view
@ -244,7 +251,7 @@ FSPagerControl *pageControl = [[FSPagerControl alloc] initWithFrame:frame2];
[self.view addSubview:pageControl];
```
* Get start with Interface Builder <br/>
* Get started with Interface Builder <br/>
1、Simply drag **UIView** instance into your View Controller, Change the `Custom Class` to `FSPagerView`. (Or `FSPageControl`) <br/>
2、Link the `dataSource` and `delegate` property of **FSPagerView** to your View Controller. <br/>
3、Register a cell class.

View File

@ -172,6 +172,14 @@ The current page, highlighted by the page control. Default is 0.
pageControl.currentPage = 1
```
### contentHorizontalAlignment
The horizontal alignment of content within the controls bounds. Default is center.
**e.g.**
```swift
pageControl.contentHorizontalAlignment = .right
```
### setStrokeColor:forState:
Sets the stroke color for page indicators to use for the specified state. (selected/normal).
@ -233,9 +241,9 @@ pod FSPagerView
* [Implement FSPagerViewDataSource](#implement_fspagerviewdatasource)
* [Implement FSPagerViewDelegate](#implement_fspagerviewdelegate)
### 1. Get start <a id='get_start'></a>
### 1. Get started <a id='get_start'></a>
* Get start with code
* Get started with code
```swift
// Create a pager view
@ -249,7 +257,7 @@ let pageControl = FSPagerControl(frame: frame2)
self.view.addSubview(pageControl)
```
* Get start with Interface Builder <br/>
* Get started with Interface Builder <br/>
1、Simply drag **UIView** instance into your View Controller, Change the `Custom Class` to `FSPagerView`. (Or `FSPageControl`) <br/>
2、Link the `dataSource` and `delegate` property of **FSPagerView** to your View Controller. <br/>
3、Register a cell class.