iOS 6 iAd属性和方法已弃用 [英] iOS 6 iAd property and methods deprecated

查看:157
本文介绍了iOS 6 iAd属性和方法已弃用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自iOS 6发布以来,有一些不推荐使用的iAd属性和方法如下:

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

currentContentSizeIdentifier
requiredContentSizeIdentifiers
ADBannerContentSizeIdentifierPortrait
ADBannerContentSizeIdentifierLandscape

那么现在实施iAd的最佳方法是什么方向?我们现在应该手动调整横幅视图的大小吗?

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

推荐答案

我的应用程序仅支持横向模式(也适用于纵向模式) ),并将iAd显示在应用程序的顶部。为了使用ios6,我必须这样做:

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:

在Monotouch中

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

对于objc(我不使用),我认为它可能是

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

[storesAdBannerView setAutoresizingMask:UIViewAutoresizingFlexibleWidth]

这篇关于iOS 6 iAd属性和方法已弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆