4 Star 5 Fork 4

Casper / LLCycleScrollView

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

iOS图片轮播 LLCycleScrollView

License Platform

Issues

如果使用过程中,有什么问题欢迎issues。

Support

  • 支持纯图片
  • 支持文本图片结合
  • 支持横向滚动
  • 支持纵向滚动
  • 支持手势滑动
  • 支持点击回调
  • 支持图片数据的延时加载
  • 支持没有数据,占位图占位(仅设置CoverImage(有默认图)即可)
  • 支持本地图片显示及与网络图的混合显示
  • 支持系统UIPageControl位置设置
  • 支持StoryBoard
  • 支持纯文本

Update

请使用最新版本 1.3.0

版本信息 更新描述
1.3.0 * 修复StoryBoard在部分设备显示问题
1.2.9 * 增加支持文本Leading约束属性titleLeading
* PageControl的Bottom约束属性pageControlBottom
1.2.8 * 支持纯文本部分属性修改,没有开放Label
1.2.7 * 支持纯文本
1.2.6 * 修改自定义PageControl反向滚动时候,pageControl的方向控制问题
1.2.5 * 修复自定义PageControl快速滚动问题,修复系统UIPageControl位置left&right对换设置问题
1.2.4 * 支持系统UIPageControl位置设置,其属性pageControlPosition
* 公开pageControl及customPageControl两个控件,方便控制及自定义
1.2.3 * 支持本地图片显示及与网络图的混合显示
* 增加图片contentMode的控制
1.2.2 * 标题显示两行文字
1.2.1 * 支持不同类型的PageControl
* 支持修改PageControl颜色,当前显示颜色等(文件注释)
1.1.1 * 支持Storyboard

CocoaPods

  • 支持CocoaPods
pod 'LLCycleScrollView' 

Usage

let bannerDemo = LLCycleScrollView.llCycleScrollViewWithFrame(CGRect.init(x: 0, y: bannerDemo.ll_y + 205, width: w, height: 200))
// 是否自动滚动
bannerDemo.autoScroll = true

// 是否无限循环,此属性修改了就不存在轮播的意义了 😄
bannerDemo.infiniteLoop = true

// 滚动间隔时间(默认为2秒)
bannerDemo.autoScrollTimeInterval = 3.0

// 等待数据状态显示的占位图
bannerDemo.placeHolderImage = #UIImage

// 如果没有数据的时候,使用的封面图
bannerDemo.coverImage = #UIImage

// 设置图片显示方式=UIImageView的ContentMode
bannerDemo.imageViewContentMode = .scaleToFill

// 设置滚动方向( vertical || horizontal )
bannerDemo.scrollDirection = .vertical

// 设置当前PageControl的样式 (.none, .system, .fill, .pill, .snake)
bannerDemo.customPageControlStyle = .snake

// 非.system的状态下,设置PageControl的tintColor
bannerDemo.customPageControlInActiveTintColor = UIColor.red

// 设置.system系统的UIPageControl当前显示的颜色
bannerDemo.pageControlCurrentPageColor = UIColor.white

// 非.system的状态下,设置PageControl的间距(默认为8.0)
bannerDemo.customPageControlIndicatorPadding = 8.0

// 设置PageControl的位置 (.left, .right 默认为.center)
bannerDemo.pageControlPosition = .center

// 背景色
bannerDemo.collectionViewBackgroundColor

// 添加到view
self.addSubview(bannerDemo1)

// 模拟网络图片获取
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + .seconds(2)) {
  bannerDemo.imagePaths = imagesURLStrings
}

Example

示例代码见ViewController.swift

Future

  • 优化代码

Author

LvJianfeng, coderjianfeng@foxmail.com

MIT License Copyright (c) 2020 Casper Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

强大的Swift 3轮播图 展开 收起
Swift 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Swift
1
https://gitee.com/dalton_lv/LLCycleScrollView.git
git@gitee.com:dalton_lv/LLCycleScrollView.git
dalton_lv
LLCycleScrollView
LLCycleScrollView
master

搜索帮助