AI-generated Key Takeaways
-
The
IMACompanionDelegate
protocol enables you to receive events from companion ad slots, like when an ad fills the slot or when a user clicks on it. -
It offers two optional methods:
companionSlot:filled:
indicates whether an ad successfully filled the slot, andcompanionSlotWasClicked:
signals when a user clicks the ad and navigates away. -
Both methods provide information about the
IMACompanionAdSlot
involved in the event.
IMACompanionDelegate
@protocol IMACompanionDelegate <NSObject>
Delegate to receive events from the companion ad slot.
-
Called when the slot is either filled or not filled.
Declaration
Swift
optional func companionSlot(_ slot: IMACompanionAdSlot, filled: Bool)
Objective-C
- (void)companionSlot:(nonnull IMACompanionAdSlot *)slot filled:(BOOL)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.
Declaration
Swift
optional func companionSlotWasClicked(_ slot: IMACompanionAdSlot)
Objective-C
- (void)companionSlotWasClicked:(nonnull IMACompanionAdSlot *)slot;
Parameters
slot
the IMACompanionAdSlot receiving the event