• Stars
    star
    162
  • Rank 232,284 (Top 5 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Swift 自动无限轮播用这个就够了 swift 4

image

#####强烈推荐使用:WRNavigationBar 超简单!!! 一行代码设置状态栏、导航栏按钮、标题、颜色、透明度,移动等

iOS 技术交流

我创建了一个 微信 iOS 技术交流群,欢迎小伙伴们加入一起交流学习~

可以加我微信我拉你进去(备注iOS),我的微信号 wr1204607318

Requirements

  • iOS 8+
  • Xcode 8+

Demo


demo列表

demo列表


知乎日报

知乎日报


本地图片轮播

本地图片轮播


网络图片轮播

网络图片轮播


StoryBoard创建

StoryBoard创建


不无限轮播

不无限轮播


不显示pageControl

不显示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.

More Repositories

1

WRNavigationBar

超简单!!! 一行代码设置状态栏、导航栏按钮、标题、颜色、透明度,移动等 WRNavigationBar which allows you to change NavigationBar's appearance dynamically
Objective-C
2,980
star
2

WRNavigationBar_swift

WRNavigationBar which allows you to change NavigationBar's appearance dynamically
Swift
632
star
3

FloatView

浮动图片,类似京东或者美团外卖的偷红包,其实最相似的是苹果的AssistiveTouch(小圆点),使用更加简单!更加轻量!
Objective-C
73
star
4

WRCellView

自定义View,类似tableView的系统cell,使用方便 Custom View, similar to the tableView system cell, easy to use
Objective-C
64
star
5

SwiftUI-WRNavigationBar

custom navigationBar in swiftui
Swift
35
star
6

WRNetwork

WRNetwork 是基于 AFNetworking 封装的一套网络请求框架
Objective-C
26
star
7

BackBtnEventIntercept_swift

系统返回按钮事件拦截 System return button event interception
Swift
14
star
8

ZhihuDaily-Swift3.0

知乎日报Swift3.0 为了让我的另一个库WRNetWrapper使用起来更高效,特开此项目作为测试,代码从0开始
Swift
10
star
9

FloatView_swift

Swift版本 浮动图片,类似京东或者美团外卖的头红包,其实最相似的是苹果的AssistiveTouch(小圆点),使用更加简单!更加轻量!
Swift
8
star
10

WebViewBackStack

iOS webView 回退栈 webView内部跳转和原生跳转两不误
Objective-C
7
star
11

BackBtnEventIntercept

系统返回按钮事件拦截
Objective-C
7
star
12

WRAlphaChannelsHelper

remove of alpha channels
Objective-C
3
star
13

WRCellView_swift

自定义Cell
3
star
14

HiddenListLine4SwiftUI

hidden list sepatator 4 swiftui before iOS15
Swift
3
star
15

ImageE

Android 图片剪裁、编辑、滤镜等
Java
2
star
16

WRImageHelper

tint image with color | alpha | rect || insets
1
star
17

TemporaryStorage

临时存储
Objective-C
1
star
18

MsgForward

if you know how to forward by add parameter,please tell me !!!
Objective-C
1
star
19

WRNavigationItem

设置导航栏中间标题、左右按钮的一个分类
1
star