- at least one App and Placement set up on Publisher Portal
- SDK is installed
- SDK is initialized
- placements have status "Testing" to get test ad for each ad request in order to test integration
Banners are associated with an UIView. This UIView has translatesAutoresizingMaskIntoConstraints equal to NO, so it can work with constraints by default.
In order to get a banner’s UIView, use:
In order to obtain a banner’s height when it fills the top view-controller's width:
[[ad view] height];
In order to control if a banner is displayed with full-width (i.e. without margins), proceed as follows before calling [adRequest requestAdWithAdReceivedHandler...]:
((DIOBannerPlacement*)placement).fullWidth = YES;
In order to control if a banner (video only) is displayed with top and bottom frames, proceed as follows before calling [adRequest requestAdWithAdReceivedHandler...]
((DIOBannerPlacement*)placement).framed = YES;
See the Sample App for a fully-working example.