SASInterstitialManager
Objective-C
@interface SASInterstitialManager : NSObject
Swift
class SASInterstitialManager : NSObject
A class that loads and shows an interstitial ad.
-
The interstitial manager delegate if any, nil otherwise.
Declaration
Objective-C
@property (weak, nullable) id<SASInterstitialManagerDelegate> delegate;
Swift
weak var delegate: (any SASInterstitialManagerDelegate)? { get set }
-
The current status of the ad.
Declaration
Objective-C
@property (readonly) SASAdStatus adStatus;
Swift
var adStatus: SASAdStatus { get }
-
The ad placement used to load the ad.
Declaration
Objective-C
@property (readonly) SASAdPlacement *_Nonnull adPlacement;
Swift
var adPlacement: SASAdPlacement { get }
-
Initialize a new instance of SASInterstitialManager.
Declaration
Objective-C
- (nonnull instancetype)initWithAdPlacement: (nonnull SASAdPlacement *)adPlacement;
Swift
init(adPlacement: SASAdPlacement)
Parameters
adPlacement
The ad placement used to load the ad.
Return Value
An initialized instance of SASInterstitialManager.
-
Initialize a new instance of SASInterstitialManager using a bidding ad response.
You can create a bidding ad response using the SASBiddingManager class.
Note
A bidding ad response can only be used once: you must recreate a new instance of the interstitial manager with a new bidding ad response after each ‘loadAd’ call.
Declaration
Objective-C
- (nonnull instancetype)initWithBiddingAdResponse: (nonnull SASBiddingAdResponse *)biddingAdResponse;
Swift
init(biddingAdResponse: SASBiddingAdResponse)
Parameters
biddingAdResponse
The bidding ad response that must be rendered.
Return Value
An initialized instance of SASInterstitialManager.
-
Attempt to load an ad using the provided ad placement.
Declaration
Objective-C
- (void)loadAd;
Swift
func loadAd()
-
Show the interstitial if the ad status is ‘SASAdStatusReady’.
Declaration
Objective-C
- (void)showFromViewController:(nonnull UIViewController *)viewController;
Swift
func show(from viewController: UIViewController)
Parameters
viewController
The view controller in which the interstitial view controller should be pushed.