简体   繁体   English

iAd和AdMob的自定义广告尺寸

[英]Custom ad sizes for iAd and AdMob

I have both iAd and AdMob in my application. 我的应用程序中同时包含iAd和AdMob。 Can I customize the ad sizes in my application to 320x250? 我可以在应用程序中将广告尺寸自定义为320x250吗? Or are only predefined sizes mentioned in the documentation possible, for example 320x50? 还是只能使用文档中提到的预定义尺寸,例如320x50?

I think it is not possible, but I just want to confirm this. 我认为这是不可能的,但我只是想确认一下。

Yes , Its possible to make custom size with AdMob using DFPBannerView. 是的,可以使用DFPBannerView使用AdMob定制尺寸。 Please try with below code - 请尝试以下代码-

// Define custom GADAdSize 320 x 220
GADAdSize customAdSize = GADAdSizeFromCGSize(320, 220);

self.adBanner = [[DFPBannerView alloc] initWithAdSize:customAdSize];

Please check below url for more details - 请检查以下网址以获取更多详细信息-

https://developers.google.com/mobile-ads-sdk/docs/dfp/ios/banner https://developers.google.com/mobile-ads-sdk/docs/dfp/ios/banner

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM