GADSwipeableInterstitialAd
@interface GADSwipeableInterstitialAd : NSObjectA swipeable interstitial ad. This format is large similar to an interstitial ad but is presented like a banner ad. When displayed, it is intended to occupy the full screen. Use this ad format if you require strict control over the ad’s presentation and closing behavior, including custom gestures such as swipes to dismiss the interstitial. Similar to interstitial ads, swipeable interstitials have a minimum required screen hold time you must implement before allowing an ad to close.
-
The view associated with the swipeable interstitial ad.
Declaration
Swift
var adView: UIView { get }Objective-C
@property (nonatomic, readonly, nonnull) UIView *adView; -
The unique identifier assigned to a specific ad placement in your app, created on the AdMob or Ad Manager UI. Ad units are important for targeting and statistics.
Example AdMob ad unit ID: @“ca-app-pub-0123456789012345/0123456789” Example Ad Manager ad unit ID: @“/21775744923/example/swipeable-interstitial”
Declaration
Swift
var adUnitID: String { get }Objective-C
@property (nonatomic, readonly, nonnull) NSString *adUnitID;
-
Information about the ad response that returned the ad.
Declaration
Swift
var responseInfo: ResponseInfo { get }Objective-C
@property (nonatomic, readonly, nonnull) GADResponseInfo *responseInfo; -
Called when the ad is estimated to have earned money.
Declaration
Swift
var paidEventHandler: GADPaidEventHandler? { get set }Objective-C
@property (nonatomic, copy, nullable) GADPaidEventHandler paidEventHandler;
-
Optional delegate to receive state change notifications.
Declaration
Swift
weak var delegate: (any SwipeableInterstitialAdDelegate)? { get set }Objective-C
@property (nonatomic, weak, nullable) id<GADSwipeableInterstitialAdDelegate> delegate; -
Delegate for receiving video lifecycle notifications.
Declaration
Swift
weak var videoControllerDelegate: (any VideoControllerDelegate)? { get set }Objective-C
@property (nonatomic, weak, nullable) id<GADVideoControllerDelegate> videoControllerDelegate; -
The root view controller used by the swipeable interstitial ad to present content after the user interacts with the ad. If this is nil, the view controller containing the swipeable interstitial ad view is used.
Declaration
Swift
weak var rootViewController: UIViewController? { get set }Objective-C
@property (nonatomic, weak, nullable) UIViewController *rootViewController; -
The minimum duration in seconds required by the loaded creative to be held on screen. 0 if no minimum is required.
Declaration
Swift
var minScreenHoldDuration: TimeInterval { get }Objective-C
@property (nonatomic, readonly) NSTimeInterval minScreenHoldDuration;
-
Loads a swipeable interstitial ad.
Declaration
Swift
class func load(with adUnitID: String, request: Request?, options: SwipeableInterstitialAdOptions?) async throws -> SwipeableInterstitialAdObjective-C
+ (void)loadWithAdUnitID:(nonnull NSString *)adUnitID request:(nullable GADRequest *)request options:(nullable GADSwipeableInterstitialAdOptions *)options completionHandler: (nonnull GADSwipeableInterstitialAdLoadCompletionHandler) completionHandler;Parameters
adUnitIDAn ad unit ID created in the AdMob or Ad Manager UI.
requestAn ad request object. If nil, a default ad request object is used.
optionsThe options object containing format-specific configuration (e.g., screen hold duration, ad size). If nil, defaults to requesting a fullscreen ad with no maximum screen hold duration preference.
completionHandlerA handler to execute when the load operation finishes or times out.