Yaman
Yaman

Reputation: 3991

iOS 6 iAd property and methods deprecated

Since iOS 6 release, there are some iAd properties and methods that are deprecated like :

currentContentSizeIdentifier
requiredContentSizeIdentifiers
ADBannerContentSizeIdentifierPortrait
ADBannerContentSizeIdentifierLandscape

So what's the best way to implement iAd now on both orientation ? Should we now resize the banner view frame manually ?

Upvotes: 8

Views: 10073

Answers (3)

Hari Padmanaban
Hari Padmanaban

Reputation: 364

I have my application only support Landscape mode(should work for Portrait mode also), and have iAd showing up on the top of the application. And to make this work with ios6 I had to do this:

In Monotouch

storesAdBannerView = new ADBannerView();
storesAdBannerView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;

For objc (which I dont use), I think it might be

[storesAdBannerView setAutoresizingMask:UIViewAutoresizingFlexibleWidth]

Upvotes: 12

Tanos
Tanos

Reputation: 49

I sAw 2 workaround there : http://www.touch-code-magazine.com/iad-code-is-broken-in-ios6/ Tested the first solution:

easy temporary solution – you can quickly get your app to compile again by using a cheap cheat, add explicitly #import to the files where you are accessing currentContentSizeIdentifier and the size name constants. That should get you going until you alter your app to use the new auto-layout features.

It works ok on xcode 4.5 (banner test ok).

Upvotes: 1

Mickaël Rémond
Mickaël Rémond

Reputation: 9055

It seems that landscape ads are somewhat phased out. See: http://www.iphonedevsdk.com/forum/iphone-sdk-development/108118-landscape-iad-banners-in-ios-6-edit-landscape-phased-out-completely.html

It need further confirmation, as I could not find any Apple document regarding that change.

Upvotes: 2

Related Questions