AI-generated Key Takeaways
- 
          IMACompanionAdSlot represents an ad slot for companion ads where the SDK places a subview inside a provided UIView container. 
- 
          Companion ads will be matched to the specified width and height, and this class is not available on tvOS. 
- 
          The viewproperty is the UIView where the companion ad will be rendered.
- 
          The widthandheightproperties define the size of the slot in pixels and are used for targeting.
- 
          The delegateproperty allows for receiving events from the companion ad slot via the IMACompanionDelegate protocol.
IMACompanionAdSlot
@interface IMACompanionAdSlot : NSObjectAd 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. DeclarationSwift 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. DeclarationSwift 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. DeclarationSwift var height: Int { get }Objective-C @property (nonatomic, readonly) NSInteger height;
- 
                  
                  The IMACompanionDelegate for receiving events from the companion ad slot. DeclarationSwift weak var delegate: (any IMACompanionDelegate)? { get set }Objective-C @property (nonatomic, weak, nullable) id<IMACompanionDelegate> delegate;
- 
                  
                  Initializes an instance of a IMACompanionAdSlot with design ad width and height. DeclarationSwift init(view: UIView, width: Int, height: Int)Objective-C - (nonnull instancetype)initWithView:(nonnull UIView *)view width:(NSInteger)width height:(NSInteger)height;Parametersviewthe UIView that will contain the companion ad widththe chosen width of the ad heightthe chosen height of the ad Return Valuethe IMACompanionAdSlot instance 
- 
                  
                  Initializes an instance of a IMACompanionAdSlot with fluid size. DeclarationSwift init(view: UIView)Objective-C - (nonnull instancetype)initWithView:(nonnull UIView *)view;Parametersviewthe UIView that will contain the companion ad. Return Valuethe IMACompanionAdSlot instance