From 22f90701dd288d0d75bc0a46049cc9217bf7617b Mon Sep 17 00:00:00 2001 From: WenchaoD Date: Sun, 19 Feb 2017 09:26:06 +0800 Subject: [PATCH] Update README and descriptions --- FSPagerView.podspec | 3 ++- FSPagerView/FSPageControl.swift | 1 + README-OBJECTIVE-C.md | 13 ++++++++++--- README.md | 14 +++++++++++--- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/FSPagerView.podspec b/FSPagerView.podspec index 93754ca..5b10b6b 100644 --- a/FSPagerView.podspec +++ b/FSPagerView.podspec @@ -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' diff --git a/FSPagerView/FSPageControl.swift b/FSPagerView/FSPageControl.swift index 495b832..ab309cb 100644 --- a/FSPagerView/FSPageControl.swift +++ b/FSPagerView/FSPageControl.swift @@ -51,6 +51,7 @@ open class FSPageControl: UIControl { } } + /// The horizontal alignment of content within the control’s bounds. Default is center. open override var contentHorizontalAlignment: UIControlContentHorizontalAlignment { didSet { self.setNeedsLayout() diff --git a/README-OBJECTIVE-C.md b/README-OBJECTIVE-C.md index 8bbe206..d42554e 100644 --- a/README-OBJECTIVE-C.md +++ b/README-OBJECTIVE-C.md @@ -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 control’s 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 +### 1. Get started -* 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
+* Get started with Interface Builder
1、Simply drag **UIView** instance into your View Controller, Change the `Custom Class` to `FSPagerView`. (Or `FSPageControl`)
2、Link the `dataSource` and `delegate` property of **FSPagerView** to your View Controller.
3、Register a cell class. diff --git a/README.md b/README.md index 600f544..7120053 100644 --- a/README.md +++ b/README.md @@ -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 control’s 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 +### 1. Get started -* 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
+* Get started with Interface Builder
1、Simply drag **UIView** instance into your View Controller, Change the `Custom Class` to `FSPagerView`. (Or `FSPageControl`)
2、Link the `dataSource` and `delegate` property of **FSPagerView** to your View Controller.
3、Register a cell class.