iOS SDK Version

FBAdViewDelegate

@protocolFBAdViewDelegate<NSObject>
The methods declared by the FBAdViewDelegate protocol allow the adopting delegate to respond to messages from the FBAdView class and thus respond to operations such as whether the ad has been loaded, the person has clicked the ad.
  • Sent after an ad has been clicked by the person.

    Declaration

    Objective-C
    -(void)adViewDidClick:(nonnullFBAdView*)adView;
    Swift
    optionalfuncadViewDidClick(_adView:FBAdView)

    Parameters

  • When an ad is clicked, the modal view will be presented. And when the user finishes the interaction with the modal view and dismiss it, this message will be sent, returning control to the application.

    Declaration

    Objective-C
    -(void)adViewDidFinishHandlingClick:(nonnullFBAdView*)adView;
    Swift
    optionalfuncadViewDidFinishHandlingClick(_adView:FBAdView)

    Parameters

  • Sent when an ad has been successfully loaded.

    Declaration

    Objective-C
    -(void)adViewDidLoad:(nonnullFBAdView*)adView;
    Swift
    optionalfuncadViewDidLoad(_adView:FBAdView)

    Parameters

  • Sent after an FBAdView fails to load the ad.

    Declaration

    Objective-C
    -(void)adView:(nonnullFBAdView*)adViewdidFailWithError:(nonnullNSError*)error;
    Swift
    optionalfuncadView(_adView:FBAdView,didFailWithErrorerror:Error)

    Parameters

  • Sent immediately before the impression of an FBAdView object will be logged.

    Declaration

    Objective-C
    -(void)adViewWillLogImpression:(nonnullFBAdView*)adView;
    Swift
    optionalfuncadViewWillLogImpression(_adView:FBAdView)

    Parameters

  • Asks the delegate for a view controller to present modal content, such as the in-app browser that can appear when an ad is clicked.

    Declaration

    Objective-C
    @optional@property(nonatomic,strong,readonly)UIViewController*_NonnullviewControllerForPresentingModalView;
    Swift
    optionalvarviewControllerForPresentingModalView:UIViewController{get}

    Return Value

    A view controller that is used to present modal content.