Reputation: 559
I am trying to integrate an Ad SDK (AdNexus) and I am new to Xcode.
I tried to do the next step:
The banner code sample below shows how to request ads using the placement ID. Beginning with version RC2.8, you can initialize banners using a combination of member ID and inventory code instead (placement ID is still supported). Here are the methods:
-(instancetype)initWithFrame:(CGRect)frame memberId:(NSInteger)memberId inventoryCode:(NSString *)inventoryCode;
-(instancetype)initWithFrame:(CGRect)frame memberId:(NSInteger)memberId inventoryCode:(NSString *)inventoryCode adSize:(CGSize)size;
viewDidLoad
and they gave me an error "Use of undeclared identifier 'frame'.Upvotes: 0
Views: 362
Reputation: 101
I assume that those methods return a subclass of UIView
.
If so, you would want to have a 'container' view in your view controller. Then, you would initialise the ad view with the frame of that container view. The last step is to add the ad view as a subview of the container. You can do this in viewDidLoad
.
Upvotes: 1