ios – iAd`UIViewController`类别`canDisplayBannerAds`有什么作用?

ios – iAd`UIViewController`类别`canDisplayBannerAds`有什么作用?,第1张

概述在iOS7中,iAds框架包括类别 – [UIViewController canDisplayBannerAds]. 这个类别做了什么以及我应该如何使用它? canDisplayBannerAds状态的标头: Set this to enable automatic management of banner ad display with the view controller. It’s im 在iOS7中,iAds框架包括类别 – [UIVIEwController candisplayBannerAds].

这个类别做了什么以及我应该如何使用它?

解决方法 candisplayBannerAds状态的标头:

Set this to enable automatic management of banner ad display with the
vIEw controller.
It’s important to note that this will modify the vIEw hIErarchy of the vIEw controller
by inserting a new container vIEw above the vIEw controller’s vIEw. The impact
is that the vIEw controller’s vIEw property will no longer return the originally
provIDed vIEw,it will return the new container. To access the original vIEw,
use the originalContentVIEw property.

目前尚不清楚的是,自动管理还涉及将ADBannerVIEw实例化并插入到视图层次结构中.您不需要实例化ADBannerVIEw,也不需要ADBannerVIEw属性或实例变量.

您仍然希望在视图控制器中遵守ADBannerVIEwDelegate协议,以便在用户点按广告时暂停您的应用,然后在全屏广告消失时恢复.

更新:除非您想要遍历视图层次结构以查找自动插入的ADBannerVIEw以将视图控制器设置为委托,否则还可以剪切ADBannerVIEwDelegate协议方法.

总结

以上是内存溢出为你收集整理的ios – iAd`UIViewController`类别`canDisplayBannerAds`有什么作用?全部内容,希望文章能够帮你解决ios – iAd`UIViewController`类别`canDisplayBannerAds`有什么作用?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/1018618.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-23
下一篇2022-05-23

发表评论

登录后才能评论

评论列表(0条)

    保存