Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pircate/fscyclescrollview
FSPagerView 封装的轮播图控件
https://github.com/pircate/fscyclescrollview
banner cyclescrollview
Last synced: 26 days ago
JSON representation
FSPagerView 封装的轮播图控件
- Host: GitHub
- URL: https://github.com/pircate/fscyclescrollview
- Owner: Pircate
- License: mit
- Created: 2018-05-07T06:09:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-10T15:57:07.000Z (almost 6 years ago)
- Last Synced: 2024-03-15T11:04:29.016Z (10 months ago)
- Topics: banner, cyclescrollview
- Language: Swift
- Homepage:
- Size: 130 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FSCycleScrollView
[![CI Status](https://img.shields.io/travis/G-Xi0N/FSCycleScrollView.svg?style=flat)](https://travis-ci.org/G-Xi0N/FSCycleScrollView)
[![Version](https://img.shields.io/cocoapods/v/FSCycleScrollView.svg?style=flat)](https://cocoapods.org/pods/FSCycleScrollView)
[![License](https://img.shields.io/cocoapods/l/FSCycleScrollView.svg?style=flat)](https://cocoapods.org/pods/FSCycleScrollView)
[![Platform](https://img.shields.io/cocoapods/p/FSCycleScrollView.svg?style=flat)](https://cocoapods.org/pods/FSCycleScrollView)## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Requirements
## Installation
FSCycleScrollView is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'FSCycleScrollView'
```## Usage
``` swift
let cycleScrollView = FSCycleScrollView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 200))
cycleScrollView.automaticSlidingInterval = 5 // 自动滚动间隔
cycleScrollView.pageControl.isHidden = true // 隐藏 page control
cycleScrollView.pageControl.hidesForSinglePage = true // 只有一页的时候隐藏 page control
cycleScrollView.isInfinite = true // 是否无限轮播
cycleScrollView.placeholder = nil // 占位图片
cycleScrollView.dataSourceType = .onlyImage(images: []) // 只显示图片
cycleScrollView.dataSourceType = .onlyTitle(titles: []) // 只显示文本
cycleScrollView.dataSourceType = .both(items: []) // 图片加文本
```## Author
gaoX, [email protected]
## License
FSCycleScrollView is available under the MIT license. See the LICENSE file for more info.