GADSwipeableInterstitialAdOptions
@interface GADSwipeableInterstitialAdOptions : NSObject <NSCopying>Options for configuring Swipeable Interstitial ad behavior.
-
Specifies the maximum duration (in seconds) the app commits to holding the ad on screen before it is eligible for dismissal. The SDK only returns ads with a hold requirement that is less than or equal to this value. Defaults to 0.
Only set this property if your app implements logic to hold swipeable interstitial ads on screen.
Declaration
Swift
var maxScreenHoldDuration: TimeInterval { get set }Objective-C
@property (nonatomic) NSTimeInterval maxScreenHoldDuration; -
An optional ad size to request. If not set, defaults to the device’s full screen size. If the requested ad size is determined to be too small for an interstitial experience, the ad request will fail.
Declaration
Swift
var adSize: CGSize { get set }Objective-C
@property (nonatomic) CGSize adSize; -
The direction in which swipe gestures should be detected as custom click gestures for swipeable interstitial ads.
Declaration
Swift
var customClickSwipeGestureDirection: UISwipeGestureRecognizer.Direction { get }Objective-C
@property (nonatomic, readonly) UISwipeGestureRecognizerDirection customClickSwipeGestureDirection; -
Determines whether the creative handles standard tap clicks when custom click swipe gestures are enabled. Defaults to YES.
Declaration
Swift
var areCustomClickSwipeGestureTapsAllowed: Bool { get }Objective-C
@property (nonatomic, assign, unsafe_unretained, readonly, getter=areCustomClickSwipeGestureTapsAllowed) BOOL customClickSwipeGestureTapsAllowed; -
Enables custom click gestures for swipeable interstitial ads by specifying the swipe direction for detecting custom click gestures, and whether tap gestures are treated as clicks on the ad.
Declaration
Swift
func enableCustomClickSwipeGesture(direction: UISwipeGestureRecognizer.Direction, tapsAllowed: Bool)Objective-C
- (void)enableCustomClickSwipeGestureWithDirection: (UISwipeGestureRecognizerDirection)direction tapsAllowed:(BOOL)tapsAllowed;