iOS SDK Version
FBInstreamAdView
Deprecated
Instream ads have been deprecated.
Objective-C
@interfaceFBInstreamAdView:UIView
Swift
classFBInstreamAdView:UIView
A customized UIView to display an instream video ad by Facebook.
- Returns YES if the instream ad has been successfully loaded.Note that the
adView:didFailWithError:
delegate method will be also be called instead ofadViewDidLoad:
if the ad fails to load for any reason.Declaration
Objective-C@property(nonatomic,readonly,getter=isAdValid)BOOLadValid;
SwiftvarisAdValid:Bool{get}
- This property must be set prior to calling
loadAd
, so that delegate method calls are received and handled.Declaration
Objective-C@property(nonatomic,weak,nullable)id<FBInstreamAdViewDelegate>delegate;
Swiftweakvardelegate:FBInstreamAdViewDelegate?{getset}
- Typed access to the id of the ad placement.
Declaration
Objective-C@property(nonatomic,copy,readonly)NSString*_NonnullplacementID;
SwiftvarplacementID:String{get}
- FBAdExtraHint to provide extra info
Declaration
Objective-C@property(nonatomic,strong,nullable)FBAdExtraHint*extraHint;
SwiftvarextraHint:FBAdExtraHint?{getset}
- DeprecatedInstream ads have been deprecated. Initialiser will return nil.Initializes and returns a newly allocated FBInstreamAdView object with the given placement id.
Declaration
Objective-C-(nullableinstancetype)initWithPlacementID:(nonnullNSString*)placementID;
Swiftinit?(placementID:String)
Parameters
- DeprecatedInstream ads have been deprecated. Calling this method will have no effect.Begins loading ad content.You should implement
adViewDidLoad:
andadView:didFailWithError:
methods ofFBInstreamAdViewDelegate
to be notified when loading succeeds or fails.Declaration
Objective-C-(void)loadAd;
SwiftfuncloadAd()
- DeprecatedInstream ads have been deprecated. Calling this method will have no effect.Begins loading ad content from a bid payload attained through a server side bid.You can implement
adViewDidLoad:
andadView:didFailWithError:
methods ofFBInstreamAdViewDelegate
to be notified when loading succeeds or fails.Declaration
Objective-C-(void)loadAdWithBidPayload:(nonnullNSString*)bidPayload;
SwiftfuncloadAd(withBidPayloadbidPayload:String)
Parameters
- DeprecatedInstream ads have been deprecated. Calling this method will have no effect.Begins ad playback. This method should only be called after an
adViewDidLoad:
call has been received.Declaration
Objective-C-(BOOL)showAdFromRootViewController:(nullableUIViewController*)rootViewController;
SwiftfuncshowAd(fromRootViewControllerrootViewController:UIViewController?)->Bool
Parameters