Dmitry Sokurenko
Dmitry Sokurenko

Reputation: 6132

Change GADBannerView size without requesting a new ad

I want to show AdMob ads in an iPhone application in both screen orientations. The ad size should to be 320x50 in portrait mode and 480x32 in landscape.

I've tried to change the bannerView frame and adSize properties, they both work well and the banner size is changed as needed, but the problem is that on each rotation the adViewDidReceiveAd method is called and the new ad is requested. So I wonder if there is a way to avoid reloading the ad when the screen is rotated and the ad size is changed?

Upvotes: 1

Views: 850

Answers (1)

RajPara
RajPara

Reputation: 2281

If I understand this properly, you want to make one ad request that pulls in a 320x50 ad creative as well as a 480x32 ad creative? You'd need two different creatives because reusing the same ad in both orientations would probably make the ad look stretched.

Don't think this is something that you can do with the AdMob SDK right now unfortunately. Don't think there's a workaround you can use here as well as this would require a server-side change.

Upvotes: 3

Related Questions