https://github.com/keenteam1990/ktcyclescrollview
⏰Swift自动无限轮播用这个就够了
https://github.com/keenteam1990/ktcyclescrollview
kt scroll swift
Last synced: 3 months ago
JSON representation
⏰Swift自动无限轮播用这个就够了
- Host: GitHub
- URL: https://github.com/keenteam1990/ktcyclescrollview
- Owner: KeenTeam1990
- Created: 2017-09-25T02:57:38.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-25T08:16:07.000Z (over 7 years ago)
- Last Synced: 2024-12-31T03:23:33.327Z (5 months ago)
- Topics: kt, scroll, swift
- Language: Swift
- Homepage:
- Size: 11.8 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

#####[ 超简单!!! 一行代码设置状态栏、导航栏按钮、标题、颜色、透明度,移动等]
------------------------------------------------------------## Requirements
- iOS 8+
- Xcode 8+## Demo
---
知乎日报
---
本地图片轮播
---
网络图片轮播
---
StoryBoard创建
---
不无限轮播
---
不显示pageControl
## Installation
> **手动拖入**
> 将 KTCycleScroll 文件夹拽入项目中即可使用## How To Use
var cycleScrollView:KTCycleScrollView?
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 = KTCycleScrollView(frame: frame, type: .SERVER, imgs: serverImages)
view.addSubview(cycleScrollView!)
// 添加代理
cycleScrollView?.delegate = self代理方法
extension ServerImgController: KTCycleScrollViewDelegate
{
/// 点击图片事件
func cycleScrollViewDidSelect(at index:Int, cycleScrollView:WRCycleScrollView)
{
print("点击了第\(index+1)个图片")
}
/// 图片滚动事件
func cycleScrollViewDidScroll(to index:Int, cycleScrollView:WRCycleScrollView)
{
print("滚动到了第\(index+1)个图片")
}
}# Contact me
- 简书: [简书](http://www.jianshu.com/u/77e9dc523648)
- GitHub: [GitHub](https://github.com/KeenTeam1990)
- Email: [email protected]
- QQ:812144991# License
KTCycleScrollView is available under the MIT license. See the LICENSE file for more info.