SwpBannerDataSource Protocol Reference

Conforms to NSObject
Declared in SwpBannerDataSource.h

– swpBanner:numberOfItemsInSection: required method

SwpBanner 数据源方法,设置 SwpBanner 每个分组显示数据的个数

- (NSInteger)swpBanner:(SwpBanner *)swpBanner numberOfItemsInSection:(NSInteger)section

Parameters

swpBanner

swpBanner

section

section

Return Value

NSInteger

Discussion

SwpBanner 数据源方法,设置 SwpBanner 每个分组显示数据的个数

Declared In

SwpBannerDataSource.h

– swpBanner:cellImageForItemAtIndexPath: required method

SwpBanner 数据源方法,设置 SwpBanner 显示默认的 Cell 显示图片的名称 | 远程 URL, 注意: customCell 值 为 NO 时 才会调用, customCell 默认为 NO

- (id)swpBanner:(SwpBanner *)swpBanner cellImageForItemAtIndexPath:(NSIndexPath *)indexPath

Parameters

swpBanner

swpBanner

indexPath

indexPath

Return Value

NSSting or UIImage

Discussion

SwpBanner 数据源方法,设置 SwpBanner 显示默认的 Cell 显示图片的名称 | 远程 URL, 注意: customCell 值 为 NO 时 才会调用, customCell 默认为 NO

Declared In

SwpBannerDataSource.h

– swpBannerNmberOfSections:

SwpBanner 数据源方法,设置 SwpBanner 分组的个数

- (NSInteger)swpBannerNmberOfSections:(SwpBanner *)swpBanner

Parameters

swpBanner

swpBanner

Return Value

section

Discussion

SwpBanner 数据源方法,设置 SwpBanner 分组的个数

Declared In

SwpBannerDataSource.h

– swpBanner:collectionView:cellForItemAtIndexPath:

SwpBanner 数据源方法,设置 SwpBanner 自定义分组中 cell 显示的数据 | 样式

- (UICollectionViewCell *)swpBanner:(SwpBanner *)swpBanner collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath

Parameters

swpBanner

swpBanner

collectionView

collectionView

indexPath

indexPath

Return Value

UICollectionViewCell or UICollectionViewCell Subclass

Discussion

SwpBanner 数据源方法,设置 SwpBanner 自定义分组中 cell 显示的数据 | 样式

Declared In

SwpBannerDataSource.h