To discuss and provide feedback on our products, join the official AdMob Discord channel in the Google Advertising and Measurement Community server.

GoogleMobileAds Framework Reference

  • GADNativeAdCustomClickGestureOptions allows publishers to customize click gestures for native ads, such as swipe and tap.

  • These options are available only for allowlisted publishers.

  • Publishers can specify the swipe gesture direction and whether taps should also be counted as clicks.

  • These options enhance user interaction with native ads by enabling custom click behaviors.

GADNativeAdCustomClickGestureOptions


@interface GADNativeAdCustomClickGestureOptions : GADAdLoaderOptions 

Ad loader options for custom click gestures. Available for allowlisted publishers only. These options will be ignored for publishers not allowlisted.

  • The direction in which swipe gestures should be detected and counted as clicks.

    Declaration

    Swift

    var swipeGestureDirection: UISwipeGestureRecognizer.Direction { get set }

    Objective-C

    @property (nonatomic) UISwipeGestureRecognizerDirection swipeGestureDirection;
  • Whether tap gestures should continue to be detected and counted as clicks.

    Declaration

    Swift

    var areTapsAllowed: Bool { get set }

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
     getter=areTapsAllowed) BOOL tapsAllowed;
  • Initialize with the direction for detecting swipe gestures and counting them as clicks, and whether tap gestures are allowed on the ad.

    Declaration

    Swift

    init(swipeGestureDirection direction: UISwipeGestureRecognizer.Direction, tapsAllowed: Bool)

    Objective-C

    - (nonnull instancetype)initWithSwipeGestureDirection:
     (UISwipeGestureRecognizerDirection)direction
     tapsAllowed:(BOOL)tapsAllowed;
  • Unavailable

    Unavailable.

    Declaration

    Objective-C

    - (nonnull instancetype)init;

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年08月20日 UTC.