# GADPictureInPictureAd


    @interface GADPictureInPictureAd : NSObject

A Picture-in-Picture (PiP) ad is a floating ad that overlays
application content.
- `


  ### [adUnitID](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Classes/GADPictureInPictureAd#/c:objc(cs)GADPictureInPictureAd(py)adUnitID)


  ` The unique identifier assigned to a specific ad placement in an app,
  created on the AdMob or Ad Manager UI.

  #### Declaration

  Swift

      var adUnitID: String { get }

  Objective-C

      @property (nonatomic, readonly, nonnull) NSString *adUnitID;

- `


  ### [responseInfo](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Classes/GADPictureInPictureAd#/c:objc(cs)GADPictureInPictureAd(py)responseInfo)


  ` Information about the ad response that returned the ad.

  #### Declaration

  Swift

      var responseInfo: ResponseInfo { get }

  Objective-C

      @property (nonatomic, readonly, nonnull) GADResponseInfo *responseInfo;

- `


  ### [delegate](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Classes/GADPictureInPictureAd#/c:objc(cs)GADPictureInPictureAd(py)delegate)


  ` Optional delegate to receive state change notifications.

  #### Declaration

  Swift

      weak var delegate: (any PictureInPictureAdDelegate)? { get set }

  Objective-C

      @property (nonatomic, weak, nullable) id<https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Protocols/GADPictureInPictureAdDelegate.html> delegate;

- `


  ### [position](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Classes/GADPictureInPictureAd#/c:objc(cs)GADPictureInPictureAd(py)position)


  ` The current position of the PiP ad. Value is
  `GADPictureInPictureAdPositionDefault` until the ad is assigned a position.

  #### Declaration

  Swift

      var position: PictureInPictureAdPosition { get }

  Objective-C

      @property (nonatomic, readonly) https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Enums/GADPictureInPictureAdPosition.html position;

- `


  ### [presentationScope](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Classes/GADPictureInPictureAd#/c:objc(cs)GADPictureInPictureAd(py)presentationScope)


  ` The presentation scope of the PiP ad.

  #### Declaration

  Swift

      var presentationScope: PictureInPictureAdPresentationScope { get }

  Objective-C

      @property (nonatomic, readonly) https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Enums/GADPictureInPictureAdPresentationScope.html presentationScope;

- `


  ### [-init](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Classes/GADPictureInPictureAd#/c:objc(cs)GADPictureInPictureAd(im)init)


  ` Unavailable
  Unavailable. Use +loadWithAdUnitID:request:completionHandler: instead.

  #### Declaration

  Objective-C

      - (nonnull instancetype)init;

- `


  ### [+loadWithAdUnitID:request:completionHandler:](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Classes/GADPictureInPictureAd#/c:objc(cs)GADPictureInPictureAd(cm)loadWithAdUnitID:request:completionHandler:)


  ` Loads a PiP ad.

  #### Declaration

  Swift

      class func load(with adUnitID: String, request: Request?) async throws -> sending PictureInPictureAd

  Objective-C

      + (void)loadWithAdUnitID:(nonnull NSString *)adUnitID
                       request:(nullable GADRequest *)request
             completionHandler:(nonnull https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Type-Definitions.html#/c:GADPictureInPictureAd_Beta.h@T@GADPictureInPictureAdLoadCompletionHandler)
                                   completionHandler;

  #### Parameters

  |---|---|
  | ` adUnitID ` | An ad unit ID created in the AdMob or Ad Manager UI. |
  | ` request ` | An ad request object. If nil, a default ad request object is used. |
  | ` completionHandler ` | A handler to execute when the load operation finishes or times out. |

- `


  ### [-showWithOptions:](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Classes/GADPictureInPictureAd#/c:objc(cs)GADPictureInPictureAd(im)showWithOptions:)


  ` Shows the PiP ad on the screen using specified GADPictureInPictureAdOptions.

  #### Declaration

  Swift

      @MainActor func show(with options: PictureInPictureAdOptions)

  Objective-C

      - (void)showWithOptions:(nonnull https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Classes/GADPictureInPictureAdOptions.html *)options;

  #### Parameters

  |---|---|
  | ` options ` | The options specifying presentation behavior. Must be called on the main thread. |

- `


  ### [-hide](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Classes/GADPictureInPictureAd#/c:objc(cs)GADPictureInPictureAd(im)hide)


  ` Hides the PiP ad by removing it from the view hierarchy.
  Must be called on the main thread.

  #### Declaration

  Swift

      @MainActor func hide()

  Objective-C

      - (void)hide;

[## Deprecated](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Classes/GADPictureInPictureAd#/Deprecated)

- `


  ### [paidEventHandler](https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/beta/reference/Classes/GADPictureInPictureAd#/c:objc(cs)GADPictureInPictureAd(py)paidEventHandler)


  ` Deprecated

  Use \[GADPictureInPictureAdDelegate pictureInPictureAd:didRecordPaidEventWithAdValue:\] instead.
  Executed when the ad is estimated to have earned money.

  #### Declaration

  Swift

      var paidEventHandler: GADPaidEventHandler? { get set }

  Objective-C

      @property (nonatomic, copy, nullable) GADPaidEventHandler paidEventHandler;