GoogleInteractiveMediaAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
IMACompanionDelegate
@protocol IMACompanionDelegate <NSObject>
Delegate to receive events from the companion ad slot.
-
Called when the slot is either filled or not filled.
Parameters
slot
|
the IMACompanionAdSlot receiving the event
|
filled
|
is the slot filled or not
|
-
Called when the slot is clicked on by the user and will
successfully navigate away.
Parameters
slot
|
the IMACompanionAdSlot receiving the event
|
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 2024-08-21 UTC.
[null,null,["Last updated 2024-08-21 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eIMACompanionDelegate\u003c/code\u003e protocol enables you to handle events from companion ad slots, like when an ad successfully fills the slot or when a user clicks on it.\u003c/p\u003e\n"],["\u003cp\u003eThis delegate provides two optional methods: \u003ccode\u003ecompanionSlot:filled:\u003c/code\u003e which indicates whether a companion ad slot was filled, and \u003ccode\u003ecompanionSlotWasClicked:\u003c/code\u003e which is triggered when a user clicks on a companion ad.\u003c/p\u003e\n"],["\u003cp\u003eBoth methods receive the \u003ccode\u003eIMACompanionAdSlot\u003c/code\u003e object as a parameter, allowing you to identify the specific ad slot involved in the event.\u003c/p\u003e\n"]]],[],null,["# GoogleInteractiveMediaAds Framework Reference\n\nIMACompanionDelegate\n====================\n\n @protocol IMACompanionDelegate \u003cNSObject\u003e\n\nDelegate to receive events from the companion ad slot.\n- `\n ``\n ``\n `\n\n ### [-companionSlot:filled:](#/c:objc(pl)IMACompanionDelegate(im)companionSlot:filled:)\n\n `\n ` \n Called when the slot is either filled or not filled. \n\n #### Declaration\n\n Swift \n\n optional func companionSlot(_ slot: ../Classes/IMACompanionAdSlot.html, filled: Bool)\n\n Objective-C \n\n - (void)companionSlot:(nonnull ../Classes/IMACompanionAdSlot.html *)slot filled:(BOOL)filled;\n\n #### Parameters\n\n |----------------|--------------------------------------------|\n | ` `*slot*` ` | the IMACompanionAdSlot receiving the event |\n | ` `*filled*` ` | is the slot filled or not |\n\n- `\n ``\n ``\n `\n\n ### [-companionSlotWasClicked:](#/c:objc(pl)IMACompanionDelegate(im)companionSlotWasClicked:)\n\n `\n ` \n Called when the slot is clicked on by the user and will\n successfully navigate away. \n\n #### Declaration\n\n Swift \n\n optional func companionSlotWasClicked(_ slot: ../Classes/IMACompanionAdSlot.html)\n\n Objective-C \n\n - (void)companionSlotWasClicked:(nonnull ../Classes/IMACompanionAdSlot.html *)slot;\n\n #### Parameters\n\n |--------------|--------------------------------------------|\n | ` `*slot*` ` | the IMACompanionAdSlot receiving the event |"]]