RepositorySwiftCNChina
MQ

MQZHot/ZCycleView

使用UICollectionView实现常见图片无限轮播,支持自定义cell,自定义pageControl,以及轮播样式

438stars
69forks
20issues
1views

ZCycleView

使用UICollectionView实现常见图片轮播,支持自定义pageControl,自定义Cell

使用方法

let cycleView = ZCycleView()
cycleView.delegate = self
cycleView.reloadItemsCount(images.count)
cycleView.itemSpacing = 10
cycleView.itemSize = CGSize(width: width - 150, height: (width - 150) / 2.3333)
cycleView.initialIndex = 1
view.addSubview(cycleView)

代理方法

protocol ZCycleViewProtocol: class {
    /// 注册cell,[重用标志符:cell类]
    func cycleViewRegisterCellClasses() -> [String: AnyClass]
    /// 配置cell
    func cycleViewConfigureCell(collectionView: UICollectionView, cellForItemAt indexPath: IndexPath, realIndex: Int) -> UICollectionViewCell
    /// 开始拖拽
    func cycleViewBeginDragingIndex(_ cycleView: ZCycleView, index: Int)
    /// 滚动到index
    func cycleViewDidScrollToIndex(_ cycleView: ZCycleView, index: Int)
    /// 点击了index
    func cycleViewDidSelectedIndex(_ cycleView: ZCycleView, index: Int)
    /// 自定义pageControl
    func cycleViewConfigurePageControl(_ cycleView: ZCycleView, pageControl: ZPageControl)
}

Similar Projects

Discover other similar projects and AI models.

RepositorySwift
WenchaoD/FSPagerView

FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders.

7.4k
Jan 2, 2025
RepositorySwift
BenEmdon/CenteredCollectionView

A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift

1.5k
Nov 22, 2026
RepositorySwift
mischa-hildebrand/AlignedCollectionViewFlowLayout

A collection view layout that gives you control over the horizontal and vertical alignment of the cells.

1.4k
Mar 14, 2025
RepositorySwift
eleev/uicollectionview-layouts-kit

📐Custom layouts for UICollectionView with examples [iOS 12+].

812
May 7, 2023
RepositorySwift
iwheelbuy/SquareMosaicLayout

An extandable mosaic UICollectionViewLayout with a focus on extremely flexible customizations :large_orange_diamond:

264
Mar 21, 2019
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositorySwift
iina/iina

The modern video player for macOS.

47.4k
Dec 1, 2026
RepositorySwift
Alamofire/Alamofire

Elegant HTTP Networking in Swift

42.4k
Nov 27, 2026
RepositorySwift
permissionlesstech/bitchat

bluetooth mesh chat, IRC vibes

37.2k
Nov 27, 2026