Before You Start Make Sure:
- App and Placement set up on Publisher Portal
- SDK is installed
- SDK is initialized
- Each Ad request has "Testing" status which enables it to test integrations.
Infeed ad unit supports both Video and Display (Static and Rich Media) ad formats. Display ad size is 300x250.
Infeed is associated with a UIView. This UIView has translatesAutoresizingMaskIntoConstraints equal to NO, so it can work with constraints by default.
In order to get Infeed UIView use:
In order to obtain Infeed height when it fills the top view-controller's width:
[[ad view] height];
In order to control if Infeed is displayed with full-width (i.e. without margins), proceed as follows before calling [adRequest requestAdWithAdReceivedHandler...]:
((DIOInFeedPlacement*)placement).fullWidth = YES;
In order to control if Infeed (video only) is displayed with top and bottom frames, proceed as follows before calling [adRequest requestAdWithAdReceivedHandler...]:
((DIOInFeedPlacement*)placement).framed = YES;
In order to control if Infeed (video only) is displayed with countdown timer proceed as follows:
((DIOInFeedPlacement*)placement).showTimer = NO;
n order to control Infeed behaviour in case of switching between screens:
- Call [ad finish] to stop the ad and release the resources associated with it.
- Call [ad leave] to pause the video ad.
- Call [ad reenter] to resume the video ad.
In order to detect if Infeed was clicked, subscribe to the <DIOAdClickDelegate> protocol and then define yourself as a delegate via:
ad.clickDelegate = self;
Finally implement the following to be notified whenever relevant:
Check the Sample App for a fully-working example.