BannerViewDelegate

@objc
public protocol BannerViewDelegate

Banner视图事件代理

  • 选中指定index

    Declaration

    Swift

    @objc
    optional func bannerView(_ bannerView: BannerView, didSelectItemAt index: Int)
  • 监听bannerView滚动,快速滚动时也会回调

    Declaration

    Swift

    @objc
    optional func bannerView(_ bannerView: BannerView, didScrollToItemAt index: Int)
  • 如果你需要自定义UICollectionViewCell样式,请实现此代理方法,默认的BannerViewCell也会调用

    Declaration

    Swift

    @objc
    optional func bannerView(_ bannerView: BannerView, customCell: UICollectionViewCell, for index: Int)
  • 如果你需要自定义UICollectionViewCell样式,请实现此代理方法返回你的自定义UICollectionViewCell的class

    Declaration

    Swift

    @objc
    optional func customCellClass(bannerView: BannerView) -> UICollectionViewCell.Type?
  • 如果你需要自定义UICollectionViewCell样式,请实现此代理方法返回你的自定义UICollectionViewCell的Nib

    Declaration

    Swift

    @objc
    optional func customCellNib(bannerView: BannerView) -> UINib?