FBNativeAdCollectionViewCellProvider
เวอร์ชั่นที่ใหม่กว่าของคลาสนี้พร้อมแล้ว ตรวจสอบได้ เวอร์ชั่นล่าสุด

Class which assists in putting FBNativeAdViews into UICollectionViews. This class manages the creation of UICollectionViewCells which host native ad views. Functionality is provided to create UICollectionCellViews as needed for a given indexPath as well as computing the height of the cells.

Superclass:FBNativeAdCollectionViewAdProvider
Declared in:FBNativeAdCollectionViewCellProvider.h
วิธีการทันใจ
collectionView:cellForItemAtIndexPath:

Helper method for implementors of UICollectionViewDataSource who would like to host native ad UICollectionViewCells in their collection view.

- (UICollectionViewCell *)
collectionView: (UICollectionView *)collectionView
cellForItemAtIndexPath: (NSIndexPath *)indexPath;
ให้คำรับรองไว้ใน: FBNativeAdCollectionViewCellProvider.h
collectionView:heightForRowAtIndexPath:

Helper method for implementors of UICollectionViewDelegate who would like to host native ad UICollectionViewCells in their collection view.

- (CGFloat)
collectionView: (nonnull UICollectionView *)collectionView
heightForRowAtIndexPath: (nonnull NSIndexPath *)indexPath;
ให้คำรับรองไว้ใน: FBNativeAdCollectionViewCellProvider.h
initWithManager:forType:

Method to create a FBNativeAdCollectionViewCellProvider.

พารามิเตอร์คำอธิบาย
manager

The naitve ad manager consumed by this provider

type

The type of this native ad template. For more information, consult FBNativeAdViewType.

- (instancetype)
initWithManager: (FBNativeAdsManager *)manager
forType: (FBNativeAdViewType)type;
ให้คำรับรองไว้ใน: FBNativeAdCollectionViewCellProvider.h
initWithManager:forType:forAttributes:

Method to create a FBNativeAdCollectionViewCellProvider.

พารามิเตอร์คำอธิบาย
manager

The naitve ad manager consumed by this provider

type

The type of this native ad template. For more information, consult FBNativeAdViewType.

attributes

The layout of this native ad template. For more information, consult FBNativeAdViewLayout.

- (instancetype)
initWithManager: (FBNativeAdsManager *)manager
forType: (FBNativeAdViewType)type
forAttributes: (FBNativeAdViewAttributes *)attributes
NS_DESIGNATED_INITIALIZER;
ให้คำรับรองไว้ใน: FBNativeAdCollectionViewCellProvider.h