Nata Mio
Nata Mio

Reputation: 2228

iAd default banner size is incorrect

I am really confused about Apple's and Xcode's documentation for iAd banner sizes. Apple says the iPhone portrait size is 320x50 here: iAd Programming Guide: Banner View Concepts.

So why is it when i drag an iAd banner in storyboard its width is 480 and its height is 66? Which I think it should be for landscape? Am I missing something?

Would it effect the banner if I adjust it to 320x50 to display the ads?

Upvotes: 1

Views: 80

Answers (1)

Daniel Storm
Daniel Storm

Reputation: 18878

Apple's iAd documentation hasn't been updated in quite sometime.

Your ADBannerView will know which device it is on and set the dimensions of the ADBannerView correctly. You should just let auto layout know where you want the ad to be. For example, if you wanted the ADBannerView to be at the bottom of the screen then pin it to the bottom of the screen with Bottom Space to: Bottom Layout Guide and align it to Align Center X to: Superview. Be sure you do not set any height, width, trailing, or leading constraints.

Upvotes: 1

Related Questions