https://github.com/wangrui460/WRCycleScrollView
Swift 自动无限轮播用这个就够了 swift 4
https://github.com/wangrui460/WRCycleScrollView
cycle cyclepictureview cyclescrollview sdcyclescrollview swift4
Last synced: 4 months ago
JSON representation
Swift 自动无限轮播用这个就够了 swift 4
- Host: GitHub
- URL: https://github.com/wangrui460/WRCycleScrollView
- Owner: wangrui460
- License: mit
- Created: 2017-05-11T15:30:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-07-19T07:33:32.000Z (over 4 years ago)
- Last Synced: 2025-04-10T01:49:45.606Z (7 months ago)
- Topics: cycle, cyclepictureview, cyclescrollview, sdcyclescrollview, swift4
- Language: Swift
- Homepage:
- Size: 10.9 MB
- Stars: 162
- Watchers: 4
- Forks: 31
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - WRCycleScrollView - Swift 自动无限轮播用 (iOS / CyclePagerView)
- awesome - WRCycleScrollView - Swift 自动无限轮播用 (iOS / CyclePagerView)
README

#####[强烈推荐使用:WRNavigationBar 超简单!!! 一行代码设置状态栏、导航栏按钮、标题、颜色、透明度,移动等](https://github.com/wangrui460/WRNavigationBar)
------------------------------------------------------------
## iOS 技术交流
我创建了一个 微信 iOS 技术交流群,欢迎小伙伴们加入一起交流学习~
可以加我微信我拉你进去(备注iOS),我的微信号 wr1204607318
## Requirements
- iOS 8+
- Xcode 8+
## Demo
---
demo列表

---
知乎日报

---
本地图片轮播

---
网络图片轮播

---
StoryBoard创建

---
不无限轮播

---
不显示pageControl

## Installation
> **手动拖入**
> 将 WRCycleScrollView 文件夹拽入项目中即可使用
## How To Use
var cycleScrollView:WRCycleScrollView?
let height = 520 * kScreenWidth / 1080.0
let frame = CGRect(x: 0, y: 150, width: kScreenWidth, height: height)
// 可加载网络图片或者本地图片
let serverImages = ["http://p.lrlz.com/data/upload/mobile/special/s252/s252_05471521705899113.png", "http://p.lrlz.com/data/upload/mobile/special/s303/s303_05442007678060723.png", "http://p.lrlz.com/data/upload/mobile/special/s303/s303_05442007587372591.png", "http://p.lrlz.com/data/upload/mobile/special/s303/s303_05442007388249407.png", "http://p.lrlz.com/data/upload/mobile/special/s303/s303_05442007470310935.png"]
// 构造方法
cycleScrollView = WRCycleScrollView(frame: frame, type: .SERVER, imgs: serverImages)
view.addSubview(cycleScrollView!)
// 添加代理
cycleScrollView?.delegate = self
代理方法
extension ServerImgController: WRCycleScrollViewDelegate
{
/// 点击图片事件
func cycleScrollViewDidSelect(at index:Int, cycleScrollView:WRCycleScrollView)
{
print("点击了第\(index+1)个图片")
}
/// 图片滚动事件
func cycleScrollViewDidScroll(to index:Int, cycleScrollView:WRCycleScrollView)
{
print("滚动到了第\(index+1)个图片")
}
}
## License
WRCycleScrollView is available under the MIT license. See the LICENSE file for more info.