iOS 6 iAd 属性和方法已弃用

标签 ios iad deprecated ios6

自 iOS 6 发布以来,有一些 iAd 属性和方法已弃用,例如:

currentContentSizeIdentifier
requiredContentSizeIdentifiers
ADBannerContentSizeIdentifierPortrait
ADBannerContentSizeIdentifierLandscape

那么现在在两个方向上实现 iAd 的最佳方式是什么?我们现在应该手动调整横幅 View 框架的大小吗?

最佳答案

我的应用程序只支持横向模式(应该也适用于纵向模式),并且 iAd 显示在应用程序的顶部。为了使它与 ios6 一起工作,我必须这样做:

在 Monotouch 中

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

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

[storesAdBannerView setAutoresizingMask:UIViewAutoresizingFlexibleWidth]

关于iOS 6 iAd 属性和方法已弃用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12557566/

相关文章:

ios - swift 3 : UITableViewCell disable selection style also disables selection

ios - 我的 xcode 工具中没有显示 iAdBannerView

javascript - Reactjs - 这不是升级时的函数错误

ios - 从 MySQL 数据库导入 iOS 应用程序中的数据

ios - 无法更改 UILabel 中的字体大小

ios - swift, tableView selectedTypes 按钮

ios - 如何知道用户是否触摸了iAd?

ios - BannerViewController 干扰 hidesBottomBarWhenPushed

ruby-on-rails-3 - 发送邮件时出现奇怪的错误 : undefined method `index' for 2011-09-09 22:15:28 +0200:Time

javascript - JavaScript 库是否应该使用已弃用的注解?