iAd banner content Size .. (iAd Support with iOs 4.2 for iPad)

ε祈祈猫儿з 提交于 2019-12-21 17:19:08

问题


We have an application that support iAds. Apparently iOs 4.2 for iPad will support this, but doing some tests with the beta SDK, there is no way to resize de banner to make it fit on the DetailView of a SplitViewController.

in Iphone you set the required content size identifiers for an ad banner, which are ADBannerContentSizeIdentifier320x50 or ADBannerContentSizeIdentifier480x32 (refering to Portrait and landscape), but there is no such identifiers in the new sdk for the ipad.

And setting the frame's or bound's width seems to be ignored. In landscape mode the banner size is (1024, 66) and landscape mode is (768, 66) no matter what.

Any ideas?

Thanks in advance


回答1:


Before I answer this question, I have to remind you that 4.2 beta is under NDA.

I can say that if you look at the API diffs for 4.2 under iAd.framework, you'll see that ADBannerContentSizeIdentifier480x32 has been deprecated and replaced.

Regardless of the device, ads will be the width of the screen. There is no way around this.

Apple's view on iAds is that they should cover either the top or bottom 10% of the screen. Period. In simpler terms, you cannot specify the size of a banner view.




回答2:


Starting with iOS 6 ADBannerContentSizeIdentifiers are deprecated, instead use something like this, as per iOS Docs...

CGSize adSize = [bannerView sizeThatFits:self.view.frame.size];


来源:https://stackoverflow.com/questions/3832101/iad-banner-content-size-iad-support-with-ios-4-2-for-ipad

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!