Why Are My iAds Being Cut Off?


When pubs are implementing iAds and other leaderboards, they’ll run into the issue where the iAds will get cut off. This is because the ad unit is 728x90, but iAd’s tablet banners are 768x66.

To get around this, we detect the size of the ad unit’s contents, recenter it, and resize it on each ad call.

This code will resize and center an MPAdView horizontally.

(void)adViewDidLoadAd:(MPAdView *)view
   CGSize size = [view adContentViewSize];
   CGRect newFrame = view.frame;
   newFrame.size = size;
   newFrame.origin.x = (self.view.bounds.size.width - size.width) / 2;
   view.frame = newFrame;