iad 横幅 - 每个应用程序一个实例或每个页面一个实例

发布于 2024-11-16 12:19:04 字数 135 浏览 2 评论 0原文

为我的应用程序提供一个 iAd 共享实例是否更合适,或者我可以在导航应用程序的每一页上创建一个新实例吗?苹果的示例代码似乎只有一个广告,并且每一页都使用一个广告。从我的角度来看,更多的广告意味着更多的钱。以这种方式执行是否存在问题,或者我对此的看法不正确?

Is it more appropriate to have one shared instance of and iAd for my app or can I create a new instance on each page of a navigation app? It seems Apple's sample code has only one ad that is used one each page. From my perspective more ads means more money. Is there an issue doing it in this manner or am I looking at this incorrectly?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

三生路 2024-11-23 12:19:04

为每个页面创建一个新实例将是标准的。这是非标准的,并且尝试在不同页面上使用相同的实例。 (为此,您需要从其超级视图中删除 ADBannerView,然后将其添加为下一个视图的子视图。)

我的猜测是,无论哪种方式,您收到的金额都大致相同。如果你能以某种方式获得更多的钱,那么苹果就会修复这个错误。

Creating a new instance for every page would be standard. It is non-standard and to try to use the same instance across different pages. (To do that you'd need to remove the ADBannerView from its superview and then add it as a subview of the next view.)

My guess is that the amount of money you'd receive would be approximately the same either way. If you could get more money one way or the other it would be a bug that Apple would fix.

最初的梦 2024-11-23 12:19:04

老实说,我认为无论哪种方式都可以做到。我有一个应用程序,它是一个分页滚动视图,它有一个位于屏幕外的 ADBannerView(如下)。当加载添加时,滚动视图会缩短 ADBannerView 的高度,并且 AdBannerView 会向上移动。 UIScrollView 的每个页面都有相同的对象。

有些人可能会说我的应用程序实际上只有 1 个视图,因为每个“页面”都是同一个 ScrollView 的一部分。

I think honestly you can do it either way. I have an app that is a paged scroll view that has an ADBannerView just off screen (below). When an add gets loaded the scroll view shortens by the height of the ADBannerView and the AdBannerView gets moved up. Its the same object for each page of the UIScrollView.

Some might argue though that my app is really only 1 view, since each 'page' is part of the same ScrollView.

打小就很酷 2024-11-23 12:19:04

根据 Apple 示例代码,您应该使用一个实例。如果您下载 iAdSuite 示例,您将在 ReadMe.txt 文件中看到以下内容:

注意:如果您的应用程序有多个显示 iAd 的选项卡或视图
横幅,请确保在每个横幅之间共享一个 ADBannerView 实例
看法。然后,在用户导航到新视图之前,设置共享
实例的委托属性为零,将其从旧视图中删除
层次结构,然后将相同的实例添加到打开的视图中并设置其
委托给适当的视图控制器。

According to the Apple sample code, you should use one instance. If you download the iAdSuite samples, you'll see this in the ReadMe.txt file:

Note: If your application has multiple tabs or views displaying an iAd
banner, be sure to share a single instance of ADBannerView across each
view. Then, before your users navigate to a new view, set the shared
instance's delegate property to nil, remove it from the old view
hierarchy, then add the same instance to the opening view and set its
delegate to the appropriate view controller.

美人迟暮 2024-11-23 12:19:04

Apple 鼓励您为每个应用使用一个 iAd Banner 实例作为最佳实践。您可以阅读以下技术说明,了解具体方法和原因:
http://developer.apple.com/library/ios/#technotes /tn2286/_index.html

Apple encourages you to use one instance of iAd Banner per app as a best practice. You can read the following technical note for how and why:
http://developer.apple.com/library/ios/#technotes/tn2286/_index.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文