iPhone 应用程序中的 iAd“ADBannerContentSizeIdentifier320x50”未声明(在此函数中首次使用)”

发布于 2024-09-26 03:16:31 字数 398 浏览 1 评论 0原文

我在 iphone 4.0 应用程序中使用 iAd,但在视图上添加 ADBannerView 后,当我尝试使用以下代码设置 ADBannerView 属性时:-

adViewTemp.requiredContentSizes= [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];

我收到以下错误消息:-

错误: 'ADBannerContentSizeIdentifier320x50' 未声明(在此首次使用 函数)

,我还检查了苹果“iAdSuite”提供的示例,我在此示例中遇到了相同的错误。 那么任何人都可以建议我如何解决这个问题。 谢谢

I am using iAd in my iphone 4.0 application but after adding the ADBannerView on view and when i try to set the ADBannerView properties using below code :-

adViewTemp.requiredContentSizes= [NSSet setWithObject:ADBannerContentSizeIdentifier320x50];

I get the below error message:-

error:
'ADBannerContentSizeIdentifier320x50'
undeclared (first use in this
function)

and i also check the sample provided by apple "iAdSuite" i get the same error in this sample.
so can any one suggest how i solve this issue.
Thanks

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

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

发布评论

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

评论(2

淡忘如思 2024-10-03 03:16:31

确保您已导入 iAds Franework 并包含导入语句。

#import <iAd/iAd.h>

Make sure you have imported the iAds Franework and included the import statement.

#import <iAd/iAd.h>
飞烟轻若梦 2024-10-03 03:16:31

不仅仅是标题,还添加框架。在左侧的 Frameworks 中,单击 cmd,选择“添加现有框架”,选择 iAd 框架。

Not just the header, add the Framework. In Frameworks on the left, cmd-click, choose Add Existing Frameworks, select the iAd framework.

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