FBNativeAdScrollView
Đã có phiên bản mới hơn của lớp này. Hãy kiểm tra phiên bản mới nhất.

Contains multiple ads in a scroll view.

Discussion:

If adding this view to a XIB or Storyboard, you may recieve the error "Unknown class FBNativeAdScrollView in Interface Builder file" in some cases. This error is caused by the linker failing to include FBNativeAdScrollView in your build. To resolve this, call [FBNativeAdScrollView class] in your project, or add "-all_load -ObjC" to "Other Linker Flags" in your project settings.

Inherits from:UIView
Declared in:FBNativeAdScrollView.h
Thuộc tính
adPersistenceEnabled

Reloads the same ads for the same manager. Default is NO.

@property (nonatomic, assign, getter=isAdPersistenceEnabled) BOOL adPersistenceEnabled;
Đã tuyên bố trong: FBNativeAdScrollView.h
animationEnabled

Toggles animating the loaded views. Default is YES.

@property (nonatomic, assign, getter=isAnimationEnabled) BOOL animationEnabled;
Đã tuyên bố trong: FBNativeAdScrollView.h
delegate

Passes delegate methods from FBNativeAd. Separate delegate calls will be made for each native ad contained.

@property (nonatomic, weak) id<FBNativeAdDelegate> delegate;
Đã tuyên bố trong: FBNativeAdScrollView.h
maximumNativeAdCount

Maximum native ads that this scroll view will load. Defaults to 5. If changed after calling loadAds, all current ads will be discarded and loadAds must be called again.

@property (nonatomic, assign, readonly) NSUInteger maximumNativeAdCount;
Đã tuyên bố trong: FBNativeAdScrollView.h
viewController

A view controller that is used to present modal content. If nil, the view searches for a view controller.

@property (nonatomic, weak) UIViewController *viewController;
Đã tuyên bố trong: FBNativeAdScrollView.h
xInset

Horizontal inset for views in the scroll view. Defaults to 8 points.

@property (nonatomic, assign) CGFloat xInset;
Đã tuyên bố trong: FBNativeAdScrollView.h
Phương thức thực thể
initWithNativeAdsManager:withType:

Creates a native ad horizontal scroll view for a given native ads manager and native ad template. The manager can be preloaded with ads, and loadAds will use the preloaded ads from the manager. Otherwise, the scroll view uses the manager to load ads normally.

Thông sốMô tả
manager

An instance of FBNativeAdManager. Can be preloaded with ads.

type

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

- (instancetype)
initWithNativeAdsManager: (FBNativeAdsManager *)manager
withType: (FBNativeAdViewType)type;
Đã tuyên bố trong: FBNativeAdScrollView.h
initWithNativeAdsManager:withType:withAttributes:

Creates a native ad horizontal scroll view for a given native ads manager and native ad template. The manager can be preloaded with ads, and loadAds will use the preloaded ads from the manager. Otherwise, the scroll view uses the manager to load ads normally.

Thông sốMô tả
manager

An instance of FBNativeAdManager. Can be preloaded with ads.

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)
initWithNativeAdsManager: (FBNativeAdsManager *)manager
withType: (FBNativeAdViewType)type
withAttributes: (FBNativeAdViewAttributes *)attributes;
Đã tuyên bố trong: FBNativeAdScrollView.h
initWithNativeAdsManager:withType:withAttributes:withMaximum:

Creates a native ad horizontal scroll view for a given native ads manager and native ad template. The manager can be preloaded with ads, and loadAds will use the preloaded ads from the manager. Otherwise, the scroll view uses the manager to load ads normally.

Thông sốMô tả
manager

An instance of FBNativeAdManager. Can be preloaded with ads.

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.

maximumNativeAdCount

Maximum native ads to show at once.

- (instancetype)
initWithNativeAdsManager: (FBNativeAdsManager *)manager
withType: (FBNativeAdViewType)type
withAttributes: (FBNativeAdViewAttributes *)attributes
withMaximum: (NSUInteger)maximumNativeAdCount;
Đã tuyên bố trong: FBNativeAdScrollView.h
initWithNativeAdsManager:withViewProvider:

This is a method to create a native ad horizontal scroll view from a user provided view.

Thông sốMô tả
manager

An instance of FBNativeAdManager. Can be preloaded with ads.

childViewProvider

Block that creates new views for each loaded native ad. Must not reuse the same instance, but return a new view for each call. Views may be arbitrarily resized and should support resizing their content through Auto Layout constraints, autoresizing masks, or manual resizing.

- (instancetype)
initWithNativeAdsManager: (FBNativeAdsManager *)manager
withViewProvider
UIView
^
FBNativeAd
nativeAd
NSUInteger
position
childViewProvider;
Đã tuyên bố trong: FBNativeAdScrollView.h
initWithNativeAdsManager:withViewProvider:withMaximum:

This is a method to create a native ad horizontal scroll view from a user provided view.

Thông sốMô tả
manager

An instance of FBNativeAdManager. Can be preloaded with ads.

childViewProvider

Block that creates new views for each loaded native ad. Must not reuse the same instance, but return a new view for each call. Views may be arbitrarily resized and should support resizing their content through Auto Layout constraints, autoresizing masks, or manual resizing.

maximumNativeAdCount

Maximum native ads to show at once.

- (instancetype)
initWithNativeAdsManager: (FBNativeAdsManager *)manager
withViewProvider
UIView
^
FBNativeAd
nativeAd
NSUInteger
position
childViewProvider
withMaximum: (NSUInteger)maximumNativeAdCount;
Đã tuyên bố trong: FBNativeAdScrollView.h