IMACompanionAdSlot
@interface IMACompanionAdSlot : NSObject
Ad slot for companion ads. The SDK will put a subview inside the provided UIView container. The companion will be matched to the width and height provided here. This class cannot be instantiated on tvOS, where companion ads are not available.
-
The view the companion will be rendered in. Display this view in your application before video ad starts.
Declaration
Swift
var view: UIView { get }
Objective-C
@property (nonatomic, readonly) UIView *_Nonnull view;
-
Width of the slot, in pixels. This value is sent to the DFP ad server for targeting.
Declaration
Swift
var width: Int { get }
Objective-C
@property (nonatomic, readonly) NSInteger width;
-
Height of the slot, in pixels. This value is sent to the DFP ad server for targeting.
Declaration
Swift
var height: Int { get }
Objective-C
@property (nonatomic, readonly) NSInteger height;
-
The IMACompanionDelegate for receiving events from the companion ad slot.
Declaration
Swift
weak var delegate: IMACompanionDelegate? { get set }
Objective-C
@property (nonatomic, weak, nullable) id<IMACompanionDelegate> delegate;