MQZHot / ZCycleView

使用UICollectionView实现常见图片无限轮播,支持自定义cell,自定义pageControl,以及轮播样式
MIT License
438 stars 69 forks source link

添加自定义cell功能 #15

Closed LeeYZ closed 6 years ago

LeeYZ commented 6 years ago

一共添加了4个可选代理方法,方法如下:

  1. 获取Cell Identifier,默认是 ZCycleViewCell
    @objc optional func customCollectionViewCellIdentifier() -> String
  2. 获取注册CollectionViewCell的Class或者是Nib
    @objc optional func customCollectionViewCellClassForCycleScrollView() -> AnyClass
    或
    @objc optional func customCollectionViewCellNibForCycleScrollView() -> UINib
  3. 可对自定义Cell的数据配置
    @objc optional func setupCustomCell(_ cell: UICollectionViewCell, for index: NSInteger, cycleView: ZCycleView)