iOS SDK Version

FBNativeBannerAd

Objective-C
@interfaceFBNativeBannerAd:FBNativeAdBase
Swift
classFBNativeBannerAd:FBNativeAdBase
The FBNativeBannerAd represents ad metadata to allow you to construct custom ad views. See the AdUnitsSample in the sample apps section of the Audience Network framework.
  • Undocumented

    Declaration

    Objective-C
    @property(nonatomic,weak,nullable)id<FBNativeBannerAdDelegate>delegate
    Swift
    weakvardelegate:FBNativeBannerAdDelegate?{getset}
  • Undocumented

    Declaration

    Objective-C
    -(instancetype)initWithPlacementID:(NSString*)placementID;
    Swift
    init(placementID:String)
  • This is a method to associate a FBNativeBannerAd with the UIView you will use to display the native ads.
    The whole area of the UIView will be clickable.

    Declaration

    Objective-C
    -(void)registerViewForInteraction:(nonnullUIView*)viewiconView:(nonnullFBMediaView*)iconViewviewController:(nullableUIViewController*)viewController;
    Swift
    funcregisterView(forInteractionview:UIView,iconView:FBMediaView,viewController:UIViewController?)

    Parameters

  • This is a method to associate FBNativeBannerAd with the UIView you will use to display the native ads and set clickable areas.

    Declaration

    Objective-C
    -(void)registerViewForInteraction:(nonnullUIView*)viewiconView:(nonnullFBMediaView*)iconViewviewController:(nullableUIViewController*)viewControllerclickableViews:(nullableNSArray<UIView*>*)clickableViews;
    Swift
    funcregisterView(forInteractionview:UIView,iconView:FBMediaView,viewController:UIViewController?,clickableViews:[UIView]?)

    Parameters

  • This is a method to associate a FBNativeBannerAd with the UIView you will use to display the native ads.
    The whole area of the UIView will be clickable.

    Declaration

    Objective-C
    -(void)registerViewForInteraction:(nonnullUIView*)viewiconImageView:(nonnullUIImageView*)iconImageViewviewController:(nullableUIViewController*)viewController;
    Swift
    funcregisterView(forInteractionview:UIView,iconImageView:UIImageView,viewController:UIViewController?)

    Parameters

  • This is a method to associate FBNativeBannerAd with the UIView you will use to display the native ads and set clickable areas.

    Declaration

    Objective-C
    -(void)registerViewForInteraction:(nonnullUIView*)viewiconImageView:(nonnullUIImageView*)iconImageViewviewController:(nullableUIViewController*)viewControllerclickableViews:(nullableNSArray<UIView*>*)clickableViews;
    Swift
    funcregisterView(forInteractionview:UIView,iconImageView:UIImageView,viewController:UIViewController?,clickableViews:[UIView]?)

    Parameters

  • This is a method to use to download all media for the ad (adChoicesIcon, icon). This is only needed to be called if the mediaCachePolicy is set to FBNativeAdsCachePolicyNone.

    Declaration

    Objective-C
    -(void)downloadMedia;
    Swift
    funcdownloadMedia()