IMACompanionAdSlot.h
1 //
2 // IMACompanionAdSlot.h
3 // GoogleIMA3
4 //
5 // Copyright (c) 2013 Google Inc. All rights reserved.
6 //
7 // Declares a data class that describes a companion ad slot.
8 
9 #import <UIKit/UIKit.h>
10 
11 @class IMACompanionAdSlot;
12 
13 #pragma mark IMACompanionDelegate
14 
18 @protocol IMACompanionDelegate<NSObject>
19 
20 @optional
21 
28 - (void)companionSlot:(IMACompanionAdSlot *)slot filled:(BOOL)filled;
29 
36 - (void)companionSlotWasClicked:(IMACompanionAdSlot *)slot;
37 
38 @end
39 
40 #pragma mark - IMACompanionAdSlot
41 
47 @interface IMACompanionAdSlot : NSObject
48 
53 @property(nonatomic, strong, readonly) UIView *view;
54 
59 @property(nonatomic, readonly) int width;
60 
65 @property(nonatomic, readonly) int height;
66 
70 @property(nonatomic, weak) id<IMACompanionDelegate> delegate;
71 
81 - (instancetype)initWithView:(UIView *)view width:(int)width height:(int)height;
82 
86 - (instancetype)init NS_UNAVAILABLE;
87 
88 @end
instancetype NS_UNAVAILABLE()
:nodoc:
Delegate to receive events from the companion ad slot.
Definition: IMACompanionAdSlot.h:18
id< IMACompanionDelegate > delegate
The IMACompanionDelegate for receiving events from the companion ad slot.
Definition: IMACompanionAdSlot.h:70
int height
Height of the slot, in pixels.
Definition: IMACompanionAdSlot.h:65
UIView * view
The view the companion will be rendered in.
Definition: IMACompanionAdSlot.h:53
int width
Width of the slot, in pixels.
Definition: IMACompanionAdSlot.h:59
Ad slot for companion ads.
Definition: IMACompanionAdSlot.h:47