iOS SDK Version
FBInterstitialAd
Objective-C
@interfaceFBInterstitialAd:NSObject
Swift
classFBInterstitialAd:NSObject
A modal view controller to represent a Facebook interstitial ad. This is a full-screen ad shown in your application.
- Typed access to the id of the ad placement.
Declaration
Objective-C@property(nonatomic,copy,readonly)NSString*_NonnullplacementID;
SwiftvarplacementID:String{get}
- the delegate
Declaration
Objective-C@property(nonatomic,weak,nullable)id<FBInterstitialAdDelegate>delegate;
Swiftweakvardelegate:FBInterstitialAdDelegate?{getset}
- FBAdExtraHint to provide extra info
Declaration
Objective-C@property(nonatomic,strong,nullable)FBAdExtraHint*extraHint;
SwiftvarextraHint:FBAdExtraHint?{getset}
- This is a method to initialize an FBInterstitialAd matching the given placement id.
Declaration
Objective-C-(nonnullinstancetype)initWithPlacementID:(nonnullNSString*)placementID;
Swiftinit(placementID:String)
Parameters
- Returns true if the interstitial ad has been successfully loaded.You should check
isAdValid
before trying to show the ad.Declaration
Objective-C@property(nonatomic,readonly,getter=isAdValid)BOOLadValid;
SwiftvarisAdValid:Bool{get}
- Begins loading the FBInterstitialAd content.You can implement
interstitialAdDidLoad:
andinterstitialAd:didFailWithError:
methods ofFBInterstitialAdDelegate
if you would like to be notified as loading succeeds or fails.Declaration
Objective-C-(void)loadAd;
Swiftfuncload()
- Begins loading the FBInterstitialAd content from a bid payload attained through a server side bid.You can implement
adViewDidLoad:
andadView:didFailWithError:
methods ofFBAdViewDelegate
if you would like to be notified as loading succeeds or fails.Declaration
Objective-C-(void)loadAdWithBidPayload:(nonnullNSString*)bidPayload;
Swiftfuncload(withBidPayloadbidPayload:String)
Parameters
- Presents the interstitial ad modally from the specified view controller.You can implement
interstitialAdDidClick:
,interstitialAdWillClose:
andinterstitialAdWillClose
methods ofFBInterstitialAdDelegate
if you would like to stay informed for thoses eventsDeclaration
Objective-C-(BOOL)showAdFromRootViewController:(nullableUIViewController*)rootViewController;
Swiftfuncshow(fromRootViewControllerrootViewController:UIViewController?)->Bool
Parameters